]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/python/test_tools_refresh_create_functions.py
Merge pull request #2336 from lonvia/do-not-mask-error-when-loading-tokenizer
[nominatim.git] / test / python / test_tools_refresh_create_functions.py
index 53641cf983f883f0afe175df2287a76f11cb2b88..3f9bccbdd4162f81165dcdddd64f88879b179ad7 100644 (file)
@@ -11,9 +11,7 @@ def sql_tmp_path(tmp_path, def_config):
     return tmp_path
 
 @pytest.fixture
-def conn(temp_db_conn, table_factory, monkeypatch):
-    monkeypatch.setenv('NOMINATIM_DATABASE_MODULE_PATH', '.')
-    table_factory('country_name', 'partition INT', (0, 1, 2))
+def conn(sql_preprocessor, temp_db_conn):
     return temp_db_conn
 
 
@@ -27,7 +25,7 @@ def test_create_functions(temp_db_cursor, conn, def_config, sql_tmp_path):
                           $$ LANGUAGE plpgsql IMMUTABLE;
                        """)
 
-    create_functions(conn, def_config, sql_tmp_path)
+    create_functions(conn, def_config)
 
     assert temp_db_cursor.scalar('SELECT test()') == 43
 
@@ -47,6 +45,6 @@ def test_create_functions_with_template(temp_db_cursor, conn, def_config, sql_tm
                           $$ LANGUAGE plpgsql IMMUTABLE;
                        """)
 
-    create_functions(conn, def_config, sql_tmp_path, enable_debug=dbg)
+    create_functions(conn, def_config, enable_debug=dbg)
 
     assert temp_db_cursor.scalar('SELECT test()') == ret