@mock.patch(REQUESTS)
def test_url_correct_with_query(self, mocked_request, mocked_osm_response):
    mocked_request.return_value = mocked_osm_response
    kwargs = dict(q='my place')
    geocode(**kwargs)
    assert (mocked_request.call_args[1]['params'] == dict(format='json', **kwargs))
@mock.patch(REQUESTS)
def test_url_correct_with_query(self, mocked_request, mocked_osm_response):
    mocked_request.return_value = mocked_osm_response
    kwargs = dict(q='my place')
    geocode(**kwargs)
    assert (mocked_request.call_args[1]['params'] == dict(format='json', **kwargs))