diff options
Diffstat (limited to 'django/test')
| -rw-r--r-- | django/test/client.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/django/test/client.py b/django/test/client.py index a3c04bb20d..015ee1309a 100644 --- a/django/test/client.py +++ b/django/test/client.py @@ -245,7 +245,11 @@ class RequestFactory(object): # If there are parameters, add them if parsed[3]: path += str(";") + force_str(parsed[3]) - return unquote(path) + path = unquote(path) + # WSGI requires latin-1 encoded strings. See get_path_info(). + if six.PY3: + path = path.encode('utf-8').decode('iso-8859-1') + return path def get(self, path, data={}, **extra): "Construct a GET request." |
