X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/46689df668f7c074e3a5ad661bac9b50bc52a0b5..8e5a19b39209f20f41b7bd10ff7dbcdb8a3dcb9c:/test/python/tools/test_import_special_phrases.py diff --git a/test/python/tools/test_import_special_phrases.py b/test/python/tools/test_import_special_phrases.py index 0dcf549c..64eb7b18 100644 --- a/test/python/tools/test_import_special_phrases.py +++ b/test/python/tools/test_import_special_phrases.py @@ -1,8 +1,8 @@ -# SPDX-License-Identifier: GPL-2.0-only +# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # -# Copyright (C) 2022 by the Nominatim developer community. +# Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Tests for import special phrases methods @@ -10,10 +10,10 @@ """ from shutil import copyfile import pytest -from nominatim.tools.special_phrases.sp_importer import SPImporter -from nominatim.tools.special_phrases.sp_wiki_loader import SPWikiLoader -from nominatim.tools.special_phrases.special_phrase import SpecialPhrase -from nominatim.errors import UsageError +from nominatim_db.tools.special_phrases.sp_importer import SPImporter +from nominatim_db.tools.special_phrases.sp_wiki_loader import SPWikiLoader +from nominatim_db.tools.special_phrases.special_phrase import SpecialPhrase +from nominatim_db.errors import UsageError from cursor import CursorForTesting @@ -128,7 +128,7 @@ def test_create_place_classtype_table_and_indexes( """ pairs = set([('class1', 'type1'), ('class2', 'type2')]) - sp_importer._create_place_classtype_table_and_indexes(pairs) + sp_importer._create_classtype_table_and_indexes(pairs) for pair in pairs: assert check_table_exist(temp_db_conn, pair[0], pair[1]) @@ -182,7 +182,7 @@ def test_import_phrases(monkeypatch, temp_db_conn, def_config, sp_importer, table_factory('place_classtype_amenity_animal_shelter') table_factory('place_classtype_wrongclass_wrongtype') - monkeypatch.setattr('nominatim.tools.special_phrases.sp_wiki_loader._get_wiki_content', + monkeypatch.setattr('nominatim_db.tools.special_phrases.sp_wiki_loader._get_wiki_content', lambda lang: xml_wiki_content) tokenizer = tokenizer_mock()