mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
add osm2pgsql gazetteer tests
This ports the gazetteer tests from osm2pgsql to BDD tests.
This commit is contained in:
@@ -185,7 +185,10 @@ def check_place_contents(context, table, exact):
|
||||
|
||||
if exact:
|
||||
cur.execute('SELECT osm_type, osm_id, class from {}'.format(table))
|
||||
assert expected_content == set([(r[0], r[1], r[2]) for r in cur])
|
||||
actual = set([(r[0], r[1], r[2]) for r in cur])
|
||||
assert expected_content == actual, \
|
||||
f"Missing entries: {expected_content - actual}\n" \
|
||||
f"Not expected in table: {actual - expected_content}"
|
||||
|
||||
|
||||
@then("(?P<table>placex|place) has no entry for (?P<oid>.*)")
|
||||
|
||||
Reference in New Issue
Block a user