mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-07 10:34:08 +00:00
adapt unit tests to use separate interpolation table
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user