summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Philippsen <nils@redhat.com>2015-08-19 16:29:07 +0200
committerNils Philippsen <nils@redhat.com>2015-08-19 16:29:07 +0200
commit6d1a54f51e8ef9040d9fbfb824f676ab2c1b4649 (patch)
tree4e9bc0d17b4175266428102e9b8580e52d7ce331
parentbe901601473bd3ba5826d86fb9912843a3517a07 (diff)
downloadpaste-git-6d1a54f51e8ef9040d9fbfb824f676ab2c1b4649.tar.gz
Python 3: Always encode params if passed as text types
Fixes tests.test_wsgiwrappers.test_wsgirequest_charset
-rw-r--r--paste/fixture.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/paste/fixture.py b/paste/fixture.py
index df1c75d..363f119 100644
--- a/paste/fixture.py
+++ b/paste/fixture.py
@@ -226,8 +226,8 @@ class TestApp(object):
if hasattr(params, 'items'):
# Some other multi-dict like format
params = urlencode(params.items())
- if six.PY3:
- params = params.encode('utf8')
+ if six.PY3 and isinstance(params, six.text_type):
+ params = params.encode('utf8')
if upload_files:
params = urlparse.parse_qsl(params, keep_blank_values=True)
content_type, params = self.encode_multipart(