def test_places_create_request_url_should_assert_equal(self): test_args = 'location=37.600768,-122.393177&types=food' expected_results = 'https://maps.googleapis.com/maps/api/place/' expected_results += 'nearbysearch/json?' + test_args expected_results += '&key=' + os.environ['GOOGLE_PLACES_API_KEY'] returned_results = places.create_request_url('NEARBY', test_args) self.assertEqual(expected_results, returned_results)
def test_create_request_url_should_return_error_message(self): expected_results = "Error: Not Valid Request Type" returned_results = places.create_request_url('FAKE_DATA', 'FAKE') self.assertEqual(expected_results, returned_results)