aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-04-06 18:29:54 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-04-06 18:29:54 +0800
commit92d5477d84c6663e71d6d22e261753a16b78000f (patch)
tree03a8f210c735bbf64f6a4d9e43a9ceaeae471cd0 /test
parent8790249c6860374b4d7eeeffae9e7b30d346eaf7 (diff)
[compat] Handle tuples properly in urlencode()
Fixes #9055
Diffstat (limited to 'test')
-rw-r--r--test/test_compat.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_compat.py b/test/test_compat.py
index cc105807a..618668210 100644
--- a/test/test_compat.py
+++ b/test/test_compat.py
@@ -76,6 +76,10 @@ class TestCompat(unittest.TestCase):
self.assertEqual(compat_urllib_parse_urlencode({'abc': b'def'}), 'abc=def')
self.assertEqual(compat_urllib_parse_urlencode({b'abc': 'def'}), 'abc=def')
self.assertEqual(compat_urllib_parse_urlencode({b'abc': b'def'}), 'abc=def')
+ self.assertEqual(compat_urllib_parse_urlencode([('abc', 'def')]), 'abc=def')
+ self.assertEqual(compat_urllib_parse_urlencode([('abc', b'def')]), 'abc=def')
+ self.assertEqual(compat_urllib_parse_urlencode([(b'abc', 'def')]), 'abc=def')
+ self.assertEqual(compat_urllib_parse_urlencode([(b'abc', b'def')]), 'abc=def')
def test_compat_shlex_split(self):
self.assertEqual(compat_shlex_split('-option "one two"'), ['-option', 'one two'])