

def test_geocode_returns_invalid_format(self, mock):
    'Test geocode_location returns None if the response is unusual.'
    mock_geocoder = Mock()
    mock_geocoder.geocode.return_value = "this isn't right!"
    mock.return_value = mock_geocoder
    self.assertEqual(location.geocode_location('some location'), (None, None))

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