X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/2c19bd5ea38fb7474d0ca530fdab7ae76cee965b..fb3353b854f40b8fd97ea942d3d9814e80e14779:/test/python/test_cli.py diff --git a/test/python/test_cli.py b/test/python/test_cli.py index 9aeca3de..38bbaefe 100644 --- a/test/python/test_cli.py +++ b/test/python/test_cli.py @@ -21,6 +21,7 @@ import nominatim.tools.check_database import nominatim.tools.database_import import nominatim.tools.freeze import nominatim.tools.refresh +import nominatim.tools.postcodes from mocks import MockParamCapture @@ -96,13 +97,13 @@ def test_import_full(temp_db, mock_func_factory): mock_func_factory(nominatim.tools.database_import, 'create_search_indices'), mock_func_factory(nominatim.tools.database_import, 'create_country_names'), mock_func_factory(nominatim.tools.refresh, 'load_address_levels_from_file'), + mock_func_factory(nominatim.tools.postcodes, 'import_postcodes'), mock_func_factory(nominatim.indexer.indexer.Indexer, 'index_full'), mock_func_factory(nominatim.tools.refresh, 'setup_website'), mock_func_factory(nominatim.db.properties, 'set_property') ] cf_mock = mock_func_factory(nominatim.tools.refresh, 'create_functions') - mock_func_factory(nominatim.clicmd.setup, 'run_legacy_script') assert 0 == call_nominatim('import', '--osm-file', __file__) @@ -174,7 +175,7 @@ def test_index_command(mock_func_factory, temp_db_cursor, params, do_bnds, do_ra def test_special_phrases_command(temp_db, mock_func_factory): func = mock_func_factory(nominatim.clicmd.special_phrases.SpecialPhrasesImporter, 'import_from_wiki') - call_nominatim('import-special-phrases', '--from-wiki') + call_nominatim('special-phrases', '--import-from-wiki') assert func.called == 1