X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/4a2873617dcbaf58ff6135aa7d8dcb115c0cc5ba..554d25e2e508c57fe763cee95b574b8e7c66eb0b:/test/python/test_tools_freeze.py diff --git a/test/python/test_tools_freeze.py b/test/python/test_tools_freeze.py index fcdab23a..19a06a9f 100644 --- a/test/python/test_tools_freeze.py +++ b/test/python/test_tools_freeze.py @@ -1,8 +1,6 @@ """ Tests for freeze functions (removing unused database parts). """ -import pytest - from nominatim.tools import freeze NOMINATIM_RUNTIME_TABLES = [ @@ -22,9 +20,9 @@ NOMINATIM_DROP_TABLES = [ 'wikipedia_article', 'wikipedia_redirect' ] -def test_drop_tables(temp_db_conn, temp_db_cursor): +def test_drop_tables(temp_db_conn, temp_db_cursor, table_factory): for table in NOMINATIM_RUNTIME_TABLES + NOMINATIM_DROP_TABLES: - temp_db_cursor.execute('CREATE TABLE {} (id int)'.format(table)) + table_factory(table) freeze.drop_update_tables(temp_db_conn)