adapt unit tests to use separate interpolation table

This commit is contained in:
Sarah Hoffmann
2026-02-16 16:25:54 +01:00
parent c2d6821f2f
commit c0f1aeea4d
3 changed files with 58 additions and 19 deletions

View File

@@ -165,12 +165,12 @@ def test_truncate_database_tables(temp_db_conn, temp_db_cursor, table_factory, w
@pytest.mark.parametrize("threads", (1, 5))
@pytest.mark.asyncio
async def test_load_data(dsn, place_row, placex_table, osmline_table,
async def test_load_data(dsn, place_row, place_interpolation_row, placex_table, osmline_table,
temp_db_cursor, threads):
for oid in range(100, 130):
place_row(osm_id=oid)
place_row(osm_type='W', osm_id=342, cls='place', typ='houses',
geom='LINESTRING(0 0, 10 10)')
place_interpolation_row(osm_type='W', osm_id=342, typ='odd',
geom='LINESTRING(0 0, 10 10)')
temp_db_cursor.execute("""
CREATE OR REPLACE FUNCTION placex_insert() RETURNS TRIGGER AS $$
@@ -238,7 +238,7 @@ class TestSetupSQL:
assert not reverse == temp_db_cursor.table_exists('search_name')
def test_create_table_triggers(self, temp_db_conn, placex_table, osmline_table,
postcode_table, load_sql):
place_interpolation_table, postcode_table, load_sql):
load_sql('functions.sql')
database_import.create_table_triggers(temp_db_conn, self.config)