summaryrefslogtreecommitdiff
path: root/trove/common/wsgi.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2016-05-02 17:57:58 +0200
committerVictor Stinner <vstinner@redhat.com>2016-05-02 22:31:06 +0200
commita007c948ae16fafa26d1f23a97a4dff0c709079e (patch)
tree6f49e2bd29a538ccd1b64f22063840c400c2c52e /trove/common/wsgi.py
parentbdf664bbdf29e32a0e88cc971826029f418d5fff (diff)
downloadtrove-a007c948ae16fafa26d1f23a97a4dff0c709079e.tar.gz
Port more API unit tests to Python 3
* HTTP body type must be bytes on Python 3: * WsgiLimiterProxy, JSONDictSerializer: encode JSON as bytes * Use byte strings for literal HTTP bodies * Encode explicitly HTTP body to UTF-8 on Python 3 * Fix the prototype of FakeHttplibSocket.makefile(): only the first mode parameter is mandatory * Replace dict.keys().sort() with sorted(dict.keys()) * tox.ini: add the following unit tests to Python 3.4: - api/common/test_extensions.py - api/test_versions.py Partially implements: blueprint trove-python3 Change-Id: I175dc55424e9b5786819f08a584ac967d083db11
Diffstat (limited to 'trove/common/wsgi.py')
-rw-r--r--trove/common/wsgi.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/trove/common/wsgi.py b/trove/common/wsgi.py
index 9b547894..bfec6c00 100644
--- a/trove/common/wsgi.py
+++ b/trove/common/wsgi.py
@@ -659,4 +659,4 @@ class JSONDictSerializer(DictSerializer):
"""Default JSON request body serialization."""
def default(self, data):
- return jsonutils.dumps(data)
+ return jsonutils.dump_as_bytes(data)