def METHOD_NAME(self):
    factory = APIRequestFactory()
    self.request = factory.get("/foo", format="json")
    self.request.user = AnonymousUser()
    self.request = APIView().initialize_request(self.request)
    self.endpoint = PostcodeViewSet()
    self.endpoint.get_ee_wrapper = lambda x, rh, params: EEMockWithElection()