X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/2bab0ca060ff224091b20a0ac808a3febaba04b1..3734f1d0b84c642ba89b5a4c39bac845f5627be7:/test/python/cli/test_cmd_refresh.py diff --git a/test/python/cli/test_cmd_refresh.py b/test/python/cli/test_cmd_refresh.py index 01b1f6e0..9074b2cc 100644 --- a/test/python/cli/test_cmd_refresh.py +++ b/test/python/cli/test_cmd_refresh.py @@ -45,9 +45,9 @@ class TestRefresh: assert self.tokenizer_mock.update_word_tokens_called - def test_refresh_postcodes(self, mock_func_factory, place_table): + def test_refresh_postcodes(self, async_mock_func_factory, mock_func_factory, place_table): func_mock = mock_func_factory(nominatim_db.tools.postcodes, 'update_postcodes') - idx_mock = mock_func_factory(nominatim_db.indexer.indexer.Indexer, 'index_postcodes') + idx_mock = async_mock_func_factory(nominatim_db.indexer.indexer.Indexer, 'index_postcodes') assert self.call_nominatim('refresh', '--postcodes') == 0 assert func_mock.called == 1 @@ -92,7 +92,7 @@ class TestRefresh: lambda *args, **kwargs: calls.append('import') or 0) monkeypatch.setattr(nominatim_db.tools.refresh, 'recompute_importance', lambda *args, **kwargs: calls.append('update')) - func_mock = mock_func_factory(nominatim.tools.refresh, 'create_functions') + func_mock = mock_func_factory(nominatim_db.tools.refresh, 'create_functions') assert self.call_nominatim('refresh', '--importance', '--wiki-data') == 0