def test_search_by_school_name(self, mock_requests): mock_response = mock.Mock() mock_response.json.return_value = self.mock_results2 mock_requests.return_value = mock_response data = api_utils.search_by_school_name('mockname') self.assertTrue(data == self.mock_results2['results'])
def test_search_by_school_name(self, mock_requests): mock_response = mock.Mock() mock_response.json.return_value = self.mock_dict mock_requests.return_value = mock_response data = api_utils.search_by_school_name('mockname') self.assertTrue(data == self.mock_dict['results'])