mirror of
https://github.com/django/django.git
synced 2025-11-01 20:31:40 +00:00
Took advantage of django.utils.six.moves.urllib.*.
This commit is contained in:
parent
ed9cd4fd8b
commit
6a6428a36f
31 changed files with 50 additions and 152 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue