X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/72b01148d2d12f71c12440c15fa078b55e1c8f86..834ae0a93f2f25b3231f4c47612ac1d2c170738a:/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)