]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/bdd/steps/db_ops.py
add tests for interpolation updates
[nominatim.git] / test / bdd / steps / db_ops.py
index 822094629d0cc1b740b7e72d083f3734d7cff0ff..b7fa1a882697b00ce9e7c5b50a05d7d31815a300 100644 (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: