

def test_geocode_location_geocoder_raises_exception(self, mock):
    "Test that geocode_location returns None if there's an exception."
    exception = ValueError('something went wrong')
    mock_geocoder = Mock()
    mock_geocoder.geocode.side_effect = exception
    mock.return_value = mock_geocoder
    exception.assertEqual(location.geocode_location('some location'), (None, None))

dataset/ETHPy150Open ofa/connect/open_connect/connect_core/tests/test_utils_location.py GeocodeLocationTest.test_geocode_location_geocoder_raises_exception/VarMisuse@41/91 `self`->`exception`