X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/79d55357e89c6f98e3ec9240d40fcebe6cd31054..25318e8a69512c9543ca5c7fee57839d5b417cb0:/test/python/test_tools_refresh_create_functions.py diff --git a/test/python/test_tools_refresh_create_functions.py b/test/python/test_tools_refresh_create_functions.py index 53ea2b52..00b863ab 100644 --- a/test/python/test_tools_refresh_create_functions.py +++ b/test/python/test_tools_refresh_create_functions.py @@ -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 @@ -33,7 +31,8 @@ def test_create_functions(temp_db_cursor, conn, def_config, sql_tmp_path): @pytest.mark.parametrize("dbg,ret", ((True, 43), (False, 22))) -def test_create_functions_with_template(temp_db_cursor, conn, def_config, sql_tmp_path, dbg, ret): +def test_create_functions_with_template(temp_db_cursor, conn, def_config, sql_tmp_path, + dbg, ret): sqlfile = sql_tmp_path / 'functions.sql' sqlfile.write_text("""CREATE OR REPLACE FUNCTION test() RETURNS INTEGER AS $$