mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Merge 3.2: Issue #13703 plus some related test suite fixes.
This commit is contained in:
commit
2fb477c0f0
38 changed files with 706 additions and 174 deletions
|
@ -13,6 +13,7 @@ import sys
|
|||
import tempfile
|
||||
|
||||
from base64 import b64encode
|
||||
import collections
|
||||
|
||||
def hexescape(char):
|
||||
"""Escape char as RFC 2396 specifies"""
|
||||
|
@ -953,8 +954,9 @@ class urlencode_Tests(unittest.TestCase):
|
|||
self.assertEqual("a=1&a=2", urllib.parse.urlencode({"a": [1, 2]}, True))
|
||||
self.assertEqual("a=None&a=a",
|
||||
urllib.parse.urlencode({"a": [None, "a"]}, True))
|
||||
data = collections.OrderedDict([("a", 1), ("b", 1)])
|
||||
self.assertEqual("a=a&a=b",
|
||||
urllib.parse.urlencode({"a": {"a": 1, "b": 1}}, True))
|
||||
urllib.parse.urlencode({"a": data}, True))
|
||||
|
||||
def test_urlencode_encoding(self):
|
||||
# ASCII encoding. Expect %3F with errors="replace'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue