X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/ad88d7a3e0f5c50cf4dbbc5dbcd4a79c57365991..d8dca2a3a9049db7da8b805042833846a188290d:/test/bdd/steps/http_responses.py?ds=sidebyside diff --git a/test/bdd/steps/http_responses.py b/test/bdd/steps/http_responses.py index 0a3bd304..2e24ed50 100644 --- a/test/bdd/steps/http_responses.py +++ b/test/bdd/steps/http_responses.py @@ -84,7 +84,8 @@ class GenericResponse: assert set(r.keys()) == {'geocoding', 'geojson', '__geocoding'}, \ f"Unexpected keys in result: {r.keys()}" check_for_attributes(r['geocoding'], 'geojson', 'absent') - r |= r.pop('geocoding') + inner = r.pop('geocoding') + r.update(inner) def assert_address_field(self, idx, field, value): @@ -133,8 +134,8 @@ class GenericResponse: lon, lat = context.osm.grid_node(int(value)) else: raise RuntimeError("Context needed when using grid coordinates") - self.check_row_field(i, 'lat', Field(float(lat)), base=subdict) - self.check_row_field(i, 'lon', Field(float(lon)), base=subdict) + self.check_row_field(i, 'lat', Field(float(lat), abs_tol=1e-07), base=subdict) + self.check_row_field(i, 'lon', Field(float(lon), abs_tol=1e-07), base=subdict) else: self.check_row_field(i, name, Field(value), base=subdict)