diff options
author | Victor Stinner <vstinner@redhat.com> | 2016-05-02 17:57:58 +0200 |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2016-05-02 22:31:06 +0200 |
commit | a007c948ae16fafa26d1f23a97a4dff0c709079e (patch) | |
tree | 6f49e2bd29a538ccd1b64f22063840c400c2c52e /trove/common/wsgi.py | |
parent | bdf664bbdf29e32a0e88cc971826029f418d5fff (diff) | |
download | trove-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.py | 2 |
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) |