def setup_callback(self, MockFacebook, MockRequest): MockRequest.side_effect = get_mock_func(self.get_setup_callback_mock_response) MockFacebook.side_effect = get_mock_func(self.get_facebook_data) response = self.client.get(self.get_setup_callback_url()) return response
def callback(self, MockFacebook, MockRequest): MockRequest.side_effect = get_mock_func(self.get_callback_mock_response) MockFacebook.side_effect = get_mock_func(self.get_facebook_data) response = self.client.get(self.get_callback_url(), {"code": "abc"}) return response