X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/cb70a2fde33e9c2455ea1cfb37ee430b00058b82..109af0ef1c55421a166fd2d45586d04fe7f6f969:/test/bdd/steps/http_responses.py diff --git a/test/bdd/steps/http_responses.py b/test/bdd/steps/http_responses.py index 247a397b..0920a7e2 100644 --- a/test/bdd/steps/http_responses.py +++ b/test/bdd/steps/http_responses.py @@ -8,7 +8,9 @@ import xml.etree.ElementTree as ET from check_functions import Almost -OSM_TYPE = {'N' : 'node', 'W' : 'way', 'R' : 'relation'} +OSM_TYPE = {'N' : 'node', 'W' : 'way', 'R' : 'relation', + 'n' : 'node', 'w' : 'way', 'r' : 'relation', + 'node' : 'n', 'way' : 'w', 'relation' : 'r'} def _geojson_result_to_json_result(geojson_result): result = geojson_result['properties'] @@ -139,6 +141,9 @@ class GenericResponse: assert self.result[i]['osm_type'] in (OSM_TYPE[value[0]], value[0]), \ BadRowValueAssert(self, i, 'osm_type', value) self.assert_field(i, 'osm_id', value[1:]) + elif name == 'osm_type': + assert self.result[i]['osm_type'] in (OSM_TYPE[value[0]], value[0]), \ + BadRowValueAssert(self, i, 'osm_type', value) elif name == 'centroid': lon, lat = value.split(' ') self.assert_field(i, 'lat', float(lat))