

def test_geocode_location(self, mock):
    'Test that a location is geocoded correctly.'
    mock_geocoder = Mock()
    mock_geocoder.geocode.return_value = [('North Desplaines St & West Fulton Mkt, Chicago, IL 60661, USA', (41.8868014, (- 87.6442893)))]
    mock.return_value = mock_geocoder
    self.assertEqual(location.geocode_location('something'), (41.8868014, (- 87.6442893)))

dataset/ETHPy150Open ofa/connect/open_connect/connect_core/tests/test_utils_location.py GeocodeLocationTest.test_geocode_location/original