]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/python/test_tools_freeze.py
read partition and languages from config file
[nominatim.git] / test / python / test_tools_freeze.py
index fcdab23a1dce3dd891d54c6edaab9aa62dab3bb2..19a06a9f7a49041c81d603f5ede9c57869515fd6 100644 (file)
@@ -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)