mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
Reverse geocode include geometry - added bounding box tests
This commit is contained in:
@@ -11,6 +11,15 @@ Feature: Reverse geocoding
|
||||
| ID | country
|
||||
| 0 | Deutschland
|
||||
|
||||
|
||||
Scenario: Boundingbox is returned
|
||||
Given the request parameters
|
||||
| format | zoom
|
||||
| xml | 4
|
||||
When looking up coordinates 53.9788769,13.0830313
|
||||
And results contain valid boundingboxes
|
||||
|
||||
|
||||
@Tiger
|
||||
Scenario: TIGER house number
|
||||
Given the request parameters
|
||||
|
||||
@@ -8,6 +8,7 @@ Feature: Search queries
|
||||
And result 0 has attributes lat,lon,display_name
|
||||
And result 0 has attributes class,type,importance,icon
|
||||
And result 0 has not attributes address
|
||||
And results contain valid boundingboxes
|
||||
|
||||
Scenario: Simple JSON search
|
||||
When sending json search query "Vaduz"
|
||||
@@ -15,6 +16,7 @@ Feature: Search queries
|
||||
And result 0 has attributes osm_type,osm_id,boundingbox
|
||||
And result 0 has attributes lat,lon,display_name,importance
|
||||
And result 0 has not attributes address
|
||||
And results contain valid boundingboxes
|
||||
|
||||
Scenario: JSON search with addressdetails
|
||||
When sending json search query "Montevideo" with address
|
||||
|
||||
@@ -211,6 +211,15 @@ def api_result_contains(step):
|
||||
m = re.match("%s$" % (v,), curres[k])
|
||||
assert_is_not_none(m, msg="field %s does not match: %s$ != %s." % (k, v, curres[k]))
|
||||
|
||||
@step(u'results contain valid boundingboxes$')
|
||||
def api_result_address_contains(step):
|
||||
step.given('the result is valid')
|
||||
for curres in world.results:
|
||||
bb = curres['boundingbox']
|
||||
if world.response_format == 'json':
|
||||
bb = ','.join(bb)
|
||||
m = re.match('^(-?\d+\.\d+),(-?\d+\.\d+),(-?\d+\.\d+),(-?\d+\.\d+)$', bb)
|
||||
assert_is_not_none(m, msg="invalid boundingbox: %s." % (curres['boundingbox']))
|
||||
|
||||
@step(u'result addresses contain$')
|
||||
def api_result_address_contains(step):
|
||||
|
||||
Reference in New Issue
Block a user