From f4a937e2cf976bb26301f7e5106c7c4c19e1b3c4 Mon Sep 17 00:00:00 2001 From: Sjoerd Langkemper Date: Wed, 20 Jul 2016 13:15:30 +0200 Subject: [PATCH] Fix python3 tests `headers.lists()` returns a generator, but `jsonify` can't handle generators. Make it a list explicitly. --- httpbin/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpbin/core.py b/httpbin/core.py index 7582e0a..9438cda 100644 --- a/httpbin/core.py +++ b/httpbin/core.py @@ -312,7 +312,7 @@ def view_status_code(codes): def response_headers(): """Returns a set of response headers from the query string """ headers = MultiDict(request.args.items(multi=True)) - response = jsonify(headers.lists()) + response = jsonify(list(headers.lists())) while True: original_data = response.data