]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/bdd/steps/queries.py
add testing for rank adaption while linking
[nominatim.git] / test / bdd / steps / queries.py
index 4d59b923ed3c39b9fee9f7556b6fe31ea7c49417..4e6ec1ff5ab02c6d3556cd17877ca48376c370d6 100644 (file)
@@ -71,7 +71,7 @@ class GenericResponse(object):
                     pass
                 elif h == 'osm':
                     assert_equal(res['osm_type'], row[h][0])
-                    assert_equal(res['osm_id'], row[h][1:])
+                    assert_equal(res['osm_id'], int(row[h][1:]))
                 elif h == 'centroid':
                     x, y = row[h].split(' ')
                     assert_almost_equal(float(y), float(res['lat']))
@@ -297,7 +297,8 @@ def query_cmd(context, query, dups):
     """
     cmd = ['/usr/bin/env', 'php']
     cmd.append(os.path.join(context.nominatim.build_dir, 'utils', 'query.php'))
-    cmd.extend(['--search', query])
+    if query:
+        cmd.extend(['--search', query])
     # add more parameters in table form
     if context.table:
         for h in context.table.headings:
@@ -455,8 +456,12 @@ def website_lookup_request(context, fmt, query):
 
     if fmt == 'json ':
         outfmt = 'json'
+    elif fmt == 'jsonv2 ':
+        outfmt = 'json'
     elif fmt == 'geojson ':
         outfmt = 'geojson'
+    elif fmt == 'geocodejson ':
+        outfmt = 'geocodejson'
     else:
         outfmt = 'xml'