diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-02 14:32:29 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-02 14:32:29 (GMT) |
commit | 9270be76624b6f45ab79c8c6ce7b965b3b0e8613 (patch) | |
tree | 4ab0e4c3239c14a9a4c5ad3b0a0e5bd7ad535564 /Lib/test/test_urllib.py | |
parent | ed0392ae06a52f768123aad0e478b5bcfac143e2 (diff) | |
download | cpython-9270be76624b6f45ab79c8c6ce7b965b3b0e8613.zip cpython-9270be76624b6f45ab79c8c6ce7b965b3b0e8613.tar.gz cpython-9270be76624b6f45ab79c8c6ce7b965b3b0e8613.tar.bz2 |
Added more tests for urllib.parse utility functions.
These functions are not documented but used in third-party code.
Diffstat (limited to 'Lib/test/test_urllib.py')
-rw-r--r-- | Lib/test/test_urllib.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index 4f38f0f..16236ef 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -1294,21 +1294,6 @@ class Pathname_Tests(unittest.TestCase): class Utility_Tests(unittest.TestCase): """Testcase to test the various utility functions in the urllib.""" - def test_splitpasswd(self): - """Some of password examples are not sensible, but it is added to - confirming to RFC2617 and addressing issue4675. - """ - self.assertEqual(('user', 'ab'),urllib.parse.splitpasswd('user:ab')) - self.assertEqual(('user', 'a\nb'),urllib.parse.splitpasswd('user:a\nb')) - self.assertEqual(('user', 'a\tb'),urllib.parse.splitpasswd('user:a\tb')) - self.assertEqual(('user', 'a\rb'),urllib.parse.splitpasswd('user:a\rb')) - self.assertEqual(('user', 'a\fb'),urllib.parse.splitpasswd('user:a\fb')) - self.assertEqual(('user', 'a\vb'),urllib.parse.splitpasswd('user:a\vb')) - self.assertEqual(('user', 'a:b'),urllib.parse.splitpasswd('user:a:b')) - self.assertEqual(('user', 'a b'),urllib.parse.splitpasswd('user:a b')) - self.assertEqual(('user 2', 'ab'),urllib.parse.splitpasswd('user 2:ab')) - self.assertEqual(('user+1', 'a+b'),urllib.parse.splitpasswd('user+1:a+b')) - def test_thishost(self): """Test the urllib.request.thishost utility function returns a tuple""" self.assertIsInstance(urllib.request.thishost(), tuple) |