summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-03-02 14:33:08 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-03-02 14:33:08 (GMT)
commit5e0fd95e3b002c3265757b98ceeb986bd3cc0f65 (patch)
treee1b59418f225a7eb104e76e59e34030b76301d26 /Lib/test/test_urllib.py
parenta4012574110b2b011a88b70f0c08f55130ff2719 (diff)
parent9270be76624b6f45ab79c8c6ce7b965b3b0e8613 (diff)
downloadcpython-5e0fd95e3b002c3265757b98ceeb986bd3cc0f65.zip
cpython-5e0fd95e3b002c3265757b98ceeb986bd3cc0f65.tar.gz
cpython-5e0fd95e3b002c3265757b98ceeb986bd3cc0f65.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.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index fcd2073..58ca2a5 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -1298,21 +1298,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)