summaryrefslogtreecommitdiff
path: root/tests/requests
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2017-01-26 14:25:15 +0100
committerClaude Paroz <claude@2xlibre.net>2017-01-26 19:49:03 +0100
commitfee42fd99ee470528858c2ccb3621135c30ec262 (patch)
treeb7d0905a11f28a0b554d39b30e0286dca2a07cc1 /tests/requests
parentaf598187ecd9ddf398aa7a68a2b955599ddf3ae1 (diff)
downloaddjango-fee42fd99ee470528858c2ccb3621135c30ec262.tar.gz
Refs #23919 -- Replaced usage of django.utils.http utilities with Python equivalents
Thanks Tim Graham for the review.
Diffstat (limited to 'tests/requests')
-rw-r--r--tests/requests/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/requests/tests.py b/tests/requests/tests.py
index ac331232aa..932078fb0e 100644
--- a/tests/requests/tests.py
+++ b/tests/requests/tests.py
@@ -3,7 +3,7 @@ from datetime import datetime, timedelta
from http import cookies
from io import BytesIO
from itertools import chain
-from urllib.parse import urlencode as original_urlencode
+from urllib.parse import urlencode
from django.core.exceptions import SuspiciousOperation
from django.core.handlers.wsgi import LimitedStream, WSGIRequest
@@ -14,7 +14,7 @@ from django.http.request import split_domain_port
from django.test import RequestFactory, SimpleTestCase, override_settings
from django.test.client import FakePayload
from django.test.utils import freeze_time
-from django.utils.http import cookie_date, urlencode
+from django.utils.http import cookie_date
from django.utils.timezone import utc
@@ -379,7 +379,7 @@ class RequestsTests(SimpleTestCase):
"""
Test a POST with non-utf-8 payload encoding.
"""
- payload = FakePayload(original_urlencode({'key': 'España'.encode('latin-1')}))
+ payload = FakePayload(urlencode({'key': 'España'.encode('latin-1')}))
request = WSGIRequest({
'REQUEST_METHOD': 'POST',
'CONTENT_LENGTH': len(payload),