]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/python/tools/test_freeze.py
Merge pull request #3424 from lonvia/importance-csc-import
[nominatim.git] / test / python / tools / test_freeze.py
index 6e8525500bf56934355bc29ed2ef43d7d93a0d96..0d44501a6360357ee9b22c19fa3b20bb317af2c7 100644 (file)
@@ -21,7 +21,6 @@ NOMINATIM_DROP_TABLES = [
     'address_levels',
     'location_area', 'location_area_country', 'location_area_large_100',
     'location_road_1',
     'address_levels',
     'location_area', 'location_area_country', 'location_area_large_100',
     'location_road_1',
-    'osmviews'
     'place', 'planet_osm_nodes', 'planet_osm_rels', 'planet_osm_ways',
     'search_name_111',
     'wikipedia_article', 'wikipedia_redirect'
     'place', 'planet_osm_nodes', 'planet_osm_rels', 'planet_osm_ways',
     'search_name_111',
     'wikipedia_article', 'wikipedia_redirect'
@@ -31,6 +30,8 @@ def test_drop_tables(temp_db_conn, temp_db_cursor, table_factory):
     for table in NOMINATIM_RUNTIME_TABLES + NOMINATIM_DROP_TABLES:
         table_factory(table)
 
     for table in NOMINATIM_RUNTIME_TABLES + NOMINATIM_DROP_TABLES:
         table_factory(table)
 
+    assert not freeze.is_frozen(temp_db_conn)
+
     freeze.drop_update_tables(temp_db_conn)
 
     for table in NOMINATIM_RUNTIME_TABLES:
     freeze.drop_update_tables(temp_db_conn)
 
     for table in NOMINATIM_RUNTIME_TABLES:
@@ -39,6 +40,8 @@ def test_drop_tables(temp_db_conn, temp_db_cursor, table_factory):
     for table in NOMINATIM_DROP_TABLES:
         assert not temp_db_cursor.table_exists(table)
 
     for table in NOMINATIM_DROP_TABLES:
         assert not temp_db_cursor.table_exists(table)
 
+    assert freeze.is_frozen(temp_db_conn)
+
 def test_drop_flatnode_file_no_file():
     freeze.drop_flatnode_file(None)
 
 def test_drop_flatnode_file_no_file():
     freeze.drop_flatnode_file(None)
 
@@ -47,7 +50,7 @@ def test_drop_flatnode_file_file_already_gone(tmp_path):
     freeze.drop_flatnode_file(tmp_path / 'something.store')
 
 
     freeze.drop_flatnode_file(tmp_path / 'something.store')
 
 
-def test_drop_flatnode_file_delte(tmp_path):
+def test_drop_flatnode_file_delete(tmp_path):
     flatfile = tmp_path / 'flatnode.store'
     flatfile.write_text('Some content')
 
     flatfile = tmp_path / 'flatnode.store'
     flatfile.write_text('Some content')