X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/59540972b64aff5351e4fc8654d5c1100c88dfc6..bee4fe5b4b497e37c77fc018fbca99f5e56b80cc:/tests/steps/api_setup.py?ds=inline diff --git a/tests/steps/api_setup.py b/tests/steps/api_setup.py index ab080096..fcaa39a2 100644 --- a/tests/steps/api_setup.py +++ b/tests/steps/api_setup.py @@ -36,7 +36,7 @@ def api_call(requesttype): world.response_format = fmt elif fmt in ('json', 'jsonv2'): if 'json_callback' in world.params: - world.json_callback = world.params['json_callback'] + world.json_callback = world.params['json_callback'].encode('utf8') assert world.page.startswith(world.json_callback + '(') assert world.page.endswith(')') world.page = world.page[(len(world.json_callback)+1):-1] @@ -122,3 +122,7 @@ def api_setup_details(step, obj): else: world.params['place_id'] = obj api_call('details') + +@step(u'sending an API call (\w+)') +def api_general_call(step, call): + api_call(call)