From 1e4a27d08790c96f657d2e960c8142d1ca69aede Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Mon, 17 Dec 2012 10:49:26 +0100 Subject: Fixed #19468 -- Decoded request.path correctly on Python 3. Thanks aliva for the report and claudep for the feedback. --- django/test/client.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'django/test') 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." -- cgit v1.3