@mock.patch(GEOCODE)
def test_geocode_wrapper_calls_geocode_properly(self, mocked_geocode):
    mocked_geocode.return_value = [{'lat': 1.1, 'lon': 2.2}]
    _geocode('my place')
    _geocode(q='somewhere')
    _geocode(city='London', country='UK')
    _geocode(postalcode='ABC 123')
    expected_calls = [mock.call(q='my place'), mock.call(q='somewhere'), mock.call(city='London', country='UK'), mock.call(postalcode='ABC 123')]
    assert (mocked_geocode.mock_calls == expected_calls)
@mock.patch(GEOCODE)
def test_geocode_wrapper_calls_geocode_properly(self, mocked_geocode):
    mocked_geocode.return_value = [{'lat': 1.1, 'lon': 2.2}]
    _geocode('my place')
    _geocode(q='somewhere')
    _geocode(city='London', country='UK')
    _geocode(postalcode='ABC 123')
    expected_calls = [mock.call(q='my place'), mock.call(q='somewhere'), mock.call(city='London', country='UK'), mock.call(postalcode='ABC 123')]
    assert (mocked_geocode.mock_calls == expected_calls)