mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Took advantage of django.utils.six.moves.urllib.*.
This commit is contained in:
@@ -18,6 +18,7 @@ from django.test.client import FakePayload
|
||||
from django.test.utils import override_settings, str_prefix
|
||||
from django.utils import six
|
||||
from django.utils.http import cookie_date, urlencode
|
||||
from django.utils.six.moves.urllib.parse import urlencode as original_urlencode
|
||||
from django.utils.timezone import utc
|
||||
|
||||
|
||||
@@ -279,8 +280,7 @@ class RequestsTests(SimpleTestCase):
|
||||
"""
|
||||
Test a POST with non-utf-8 payload encoding.
|
||||
"""
|
||||
from django.utils.http import urllib_parse
|
||||
payload = FakePayload(urllib_parse.urlencode({'key': 'España'.encode('latin-1')}))
|
||||
payload = FakePayload(original_urlencode({'key': 'España'.encode('latin-1')}))
|
||||
request = WSGIRequest({
|
||||
'REQUEST_METHOD': 'POST',
|
||||
'CONTENT_LENGTH': len(payload),
|
||||
|
||||
Reference in New Issue
Block a user