]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/python/tools/test_import_special_phrases.py
adapt tests for windowing SQL
[nominatim.git] / test / python / tools / test_import_special_phrases.py
index 57664586259ca1bcdee23020b4cd55ca237a5bdb..75a6a066d43f19598d3b0b00b6bf347cb5d7e6ee 100644 (file)
@@ -17,11 +17,6 @@ from nominatim.errors import UsageError
 
 from cursor import CursorForTesting
 
 
 from cursor import CursorForTesting
 
-@pytest.fixture
-def testfile_dir(src_dir):
-    return src_dir / 'test' / 'testfiles'
-
-
 @pytest.fixture
 def sp_importer(temp_db_conn, def_config, monkeypatch):
     """
 @pytest.fixture
 def sp_importer(temp_db_conn, def_config, monkeypatch):
     """
@@ -133,7 +128,7 @@ def test_create_place_classtype_table_and_indexes(
     """
     pairs = set([('class1', 'type1'), ('class2', 'type2')])
 
     """
     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])
 
     for pair in pairs:
         assert check_table_exist(temp_db_conn, pair[0], pair[1])
@@ -187,8 +182,8 @@ 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')
 
     table_factory('place_classtype_amenity_animal_shelter')
     table_factory('place_classtype_wrongclass_wrongtype')
 
-    monkeypatch.setattr('nominatim.tools.special_phrases.sp_wiki_loader.SPWikiLoader._get_wiki_content',
-                        lambda self, lang: xml_wiki_content)
+    monkeypatch.setattr('nominatim.tools.special_phrases.sp_wiki_loader._get_wiki_content',
+                        lambda lang: xml_wiki_content)
 
     tokenizer = tokenizer_mock()
     sp_importer.import_phrases(tokenizer, should_replace)
 
     tokenizer = tokenizer_mock()
     sp_importer.import_phrases(tokenizer, should_replace)