X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/00379183adaca10dbbae1c3819e8652269d49ad7..21c590416854b1245866b96772fde61050c0e01a:/tests/steps/api_setup.py diff --git a/tests/steps/api_setup.py b/tests/steps/api_setup.py index fcaa39a2..c9a4bac4 100644 --- a/tests/steps/api_setup.py +++ b/tests/steps/api_setup.py @@ -10,6 +10,7 @@ import logging logger = logging.getLogger(__name__) def api_call(requesttype): + world.request_type = requesttype world.json_callback = None data = urllib.urlencode(world.params) url = "%s/%s?%s" % (world.config.base_url, requesttype, data) @@ -123,6 +124,13 @@ def api_setup_details(step, obj): world.params['place_id'] = obj api_call('details') +@step(u'looking up (\w+) places ((?:[a-z]\d+,*)+)') +def api_setup_lookup(step, fmt, ids): + world.params['osm_ids'] = ids + if fmt and fmt.strip(): + world.params['format'] = fmt.strip() + api_call('lookup') + @step(u'sending an API call (\w+)') def api_general_call(step, call): api_call(call)