mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-10 03:54:06 +00:00
add regression test
This commit is contained in:
@@ -184,3 +184,10 @@ Feature: API regression tests
|
|||||||
| 1 | 0,0,-1,-1
|
| 1 | 0,0,-1,-1
|
||||||
When sending json search query "sy"
|
When sending json search query "sy"
|
||||||
Then exactly 0 results are returned
|
Then exactly 0 results are returned
|
||||||
|
|
||||||
|
Scenario: github #190
|
||||||
|
When looking up place N257363453
|
||||||
|
Then the results contain
|
||||||
|
| osm_type | osm_id | latlon
|
||||||
|
| node | 257363453 | 35.8404121,128.5586643 +-100m
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,16 @@ def api_setup_reverse(step, fmt, lat, lon):
|
|||||||
world.params['format'] = fmt.strip()
|
world.params['format'] = fmt.strip()
|
||||||
api_call('reverse')
|
api_call('reverse')
|
||||||
|
|
||||||
|
@step(u'looking up place ([NRW]?\d+)')
|
||||||
|
def api_setup_details(step, obj):
|
||||||
|
if obj[0] in ('N', 'R', 'W'):
|
||||||
|
# an osm id
|
||||||
|
world.params['osm_type'] = obj[0]
|
||||||
|
world.params['osm_id'] = obj[1:]
|
||||||
|
else:
|
||||||
|
world.params['place_id'] = obj
|
||||||
|
api_call('reverse')
|
||||||
|
|
||||||
@step(u'looking up details for ([NRW]?\d+)')
|
@step(u'looking up details for ([NRW]?\d+)')
|
||||||
def api_setup_details(step, obj):
|
def api_setup_details(step, obj):
|
||||||
if obj[0] in ('N', 'R', 'W'):
|
if obj[0] in ('N', 'R', 'W'):
|
||||||
|
|||||||
Reference in New Issue
Block a user