From: Sarah Hoffmann Date: Sun, 29 Mar 2015 16:17:28 +0000 (+0200) Subject: fix utf8 in tests for jsonp X-Git-Tag: v2.4.0~8 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/59be7846e9b5b509c7f1912e2001e25e82c42ba5 fix utf8 in tests for jsonp --- diff --git a/tests/steps/api_setup.py b/tests/steps/api_setup.py index 35443cdb..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]