add tests for interpolation updates

This commit is contained in:
Sarah Hoffmann
2016-11-27 11:56:43 +01:00
parent c20f8b13a5
commit 4f2d73aa7c
2 changed files with 250 additions and 2 deletions

View File

@@ -314,8 +314,8 @@ def check_search_name_contents(context):
context.db.commit()
@then("(?P<oid>\w+) expands to interpolation")
def check_location_property_osmline(context, oid):
@then("(?P<oid>\w+) expands to(?P<neg> no)? interpolation")
def check_location_property_osmline(context, oid, neg):
cur = context.db.cursor(cursor_factory=psycopg2.extras.DictCursor)
nid = NominatimID(oid)
@@ -325,6 +325,10 @@ def check_location_property_osmline(context, oid):
FROM location_property_osmline WHERE osm_id = %s""",
(nid.oid, ))
if neg:
eq_(0, cur.rowcount)
return
todo = list(range(len(list(context.table))))
for res in cur:
for i in todo: