X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/16bb0071350f66ff67308c5d33ae95dc1f2341ea..c06a1d007a4e67ab5caf5bf63d351f83e4e54ab6:/test/python/test_tokenizer_legacy.py?ds=inline diff --git a/test/python/test_tokenizer_legacy.py b/test/python/test_tokenizer_legacy.py index 76b51f71..2669e608 100644 --- a/test/python/test_tokenizer_legacy.py +++ b/test/python/test_tokenizer_legacy.py @@ -243,15 +243,14 @@ def test_update_special_phrase_delete_all(analyzer, word_table, temp_db_cursor, def test_update_special_phrases_no_replace(analyzer, word_table, temp_db_cursor, make_standard_name): - temp_db_cursor.execute("""INSERT INTO word (word_token, word, class, type, operator) - VALUES (' foo', 'foo', 'amenity', 'prison', 'in'), - (' bar', 'bar', 'highway', 'road', null)""") + word_table.add_special(' foo', 'foo', 'amenity', 'prison', 'in') + word_table.add_special(' bar', 'bar', 'highway', 'road', None) - assert 2 == temp_db_cursor.scalar("SELECT count(*) FROM word WHERE class != 'place'""") + assert word_table.count_special() == 2 analyzer.update_special_phrases([], False) - assert 2 == temp_db_cursor.scalar("SELECT count(*) FROM word WHERE class != 'place'""") + assert word_table.count_special() == 2 def test_update_special_phrase_modify(analyzer, word_table, make_standard_name):