X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/86d90bc46005c00f2367ad759804f528adc4c6a5..0aaeced8aa7aaaa573144724674b2e824fa11778:/tests/steps/api_setup.py diff --git a/tests/steps/api_setup.py b/tests/steps/api_setup.py index 9accf420..ab080096 100644 --- a/tests/steps/api_setup.py +++ b/tests/steps/api_setup.py @@ -103,6 +103,16 @@ def api_setup_reverse(step, fmt, lat, lon): world.params['format'] = fmt.strip() api_call('reverse') +@step(u'looking up place ([NRW]?\d+)') +def api_setup_details_reverse(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+)') def api_setup_details(step, obj): if obj[0] in ('N', 'R', 'W'):