1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Took advantage of django.utils.six.moves.urllib.*.

This commit is contained in:
Aymeric Augustin
2013-09-05 14:38:59 -05:00
parent ed9cd4fd8b
commit 6a6428a36f
31 changed files with 50 additions and 152 deletions

View File

@@ -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),