diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2010-07-19 18:17:19 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-07-19 18:17:19 (GMT) |
commit | 79e17f6f666e6b41320b7355c34d8a292fa5b586 (patch) | |
tree | 7db7c5eb546ac46879af936aac738eb0ba568ec8 /Lib/test | |
parent | 99212f61db1155c4d82b449078fe337cbd42a19f (diff) | |
download | cpython-79e17f6f666e6b41320b7355c34d8a292fa5b586.zip cpython-79e17f6f666e6b41320b7355c34d8a292fa5b586.tar.gz cpython-79e17f6f666e6b41320b7355c34d8a292fa5b586.tar.bz2 |
Fix Issue9301 - urllib.parse.unquote and unquote_to_byte to raise TypeError for None.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_urllib.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index e293cf0..44574c9 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -554,6 +554,7 @@ class UnquotingTests(unittest.TestCase): self.assertEqual(result.count('%'), 1, "using unquote(): not all characters escaped: " "%s" % result) + self.assertRaises(TypeError, urllib.parse.unquote, None) def test_unquoting_badpercent(self): # Test unquoting on bad percent-escapes @@ -589,6 +590,8 @@ class UnquotingTests(unittest.TestCase): self.assertEqual(expect, result, "using unquote_to_bytes(): %r != %r" % (expect, result)) + self.assertRaises(TypeError, urllib.parse.unquote_to_bytes, None) + def test_unquoting_mixed_case(self): # Test unquoting on mixed-case hex digits in the percent-escapes given = '%Ab%eA' |