From: Sarah Hoffmann Date: Fri, 25 Mar 2016 10:18:27 +0000 (+0100) Subject: tests: update for osm2gsql changes X-Git-Tag: v3.0.0~191 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/8534ce5ec2e77ae12cda0c203b1c88f14ceedf50 tests: update for osm2gsql changes Also fixes a missing type set for query.php tests. --- diff --git a/tests/steps/db_setup.py b/tests/steps/db_setup.py index 8041c6cc..23d526f8 100644 --- a/tests/steps/db_setup.py +++ b/tests/steps/db_setup.py @@ -184,9 +184,9 @@ def import_fill_planet_osm_rels(step): if not members: members = None - cur.execute("""INSERT INTO planet_osm_rels - (id, way_off, rel_off, parts, members, tags, pending) - VALUES (%s, %s, %s, %s, %s, %s, false)""", + cur.execute("""INSERT INTO planet_osm_rels + (id, way_off, rel_off, parts, members, tags) + VALUES (%s, %s, %s, %s, %s, %s)""", (line['id'], len(parts['n']), len(parts['n']) + len(parts['w']), parts['n'] + parts['w'] + parts['r'], members, tags)) world.conn.commit() @@ -202,9 +202,8 @@ def import_fill_planet_osm_ways(step): tags = None nodes = [int(x.strip()) for x in line['nodes'].split(',')] - cur.execute("""INSERT INTO planet_osm_ways - (id, nodes, tags, pending) - VALUES (%s, %s, %s, false)""", + cur.execute("""INSERT INTO planet_osm_ways (id, nodes, tags) + VALUES (%s, %s, %s)""", (line['id'], nodes, tags)) world.conn.commit() @@ -271,6 +270,7 @@ def query_cmd(step, query, with_dups): (outp, err) = proc.communicate() assert (proc.returncode == 0), "query.php failed with message: %s" % err world.page = outp - world.response_format = 'json' + world.response_format = 'json' + world.request_type = 'search' world.returncode = 200