@mock.patch(_GEOCODE)
def test_underlying_geocoding_function_called_with_query_method_only(self, mocked_geocode, test_dataframe):
    mocked_geocode.side_effect = [{'lat': 1, 'lon': 4}, {'lat': 2, 'lon': 5}, {'lat': 3, 'lon': 6}]
    expected_dataframe = pd.DataFrame({'index': [0, 1, 2], 'city': ['London', 'Sheffield', 'Brussels'], 'country': ['UK', 'United Kingdom', 'Belgium'], 'latitude': [1.0, 2.0, 3.0], 'longitude': [4.0, 5.0, 6.0]})
    expected_calls = [mock.call(q='London UK'), mock.call(q='Sheffield United Kingdom'), mock.call(q='Brussels Belgium')]
    geocoded_dataframe = geocode_batch_dataframe(test_dataframe, query_method='query_only')
    assert_frame_equal(geocoded_dataframe, expected_dataframe, check_like=True, check_dtype=False)
    assert (mocked_geocode.mock_calls == expected_calls)
@mock.patch(_GEOCODE)
def test_underlying_geocoding_function_called_with_query_method_only(self, mocked_geocode, test_dataframe):
    mocked_geocode.side_effect = [{'lat': 1, 'lon': 4}, {'lat': 2, 'lon': 5}, {'lat': 3, 'lon': 6}]
    expected_dataframe = pd.DataFrame({'index': [0, 1, 2], 'city': ['London', 'Sheffield', 'Brussels'], 'country': ['UK', 'United Kingdom', 'Belgium'], 'latitude': [1.0, 2.0, 3.0], 'longitude': [4.0, 5.0, 6.0]})
    expected_calls = [mock.call(q='London UK'), mock.call(q='Sheffield United Kingdom'), mock.call(q='Brussels Belgium')]
    geocoded_dataframe = geocode_batch_dataframe(test_dataframe, query_method='query_only')
    assert_frame_equal(geocoded_dataframe, expected_dataframe, check_like=True, check_dtype=False)
    assert (mocked_geocode.mock_calls == expected_calls)