X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/101a1f895d25451535f5c186d2ce1f5b7e753e3b..5d32ac9ac918929c11602a740c3033bcfdb0f929:/test/python/test_tools_freeze.py?ds=inline 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)