mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Merged revisions 83415 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83415 | senthil.kumaran | 2010-08-01 23:23:37 +0530 (Sun, 01 Aug 2010) | 3 lines Fix Issue8123 - TypeError in urllib when trying to use HTTP authentication ........
This commit is contained in:
parent
f6df1ee171
commit
afef78f832
2 changed files with 13 additions and 2 deletions
|
@ -191,6 +191,17 @@ Content-Type: text/html; charset=iso-8859-1
|
|||
finally:
|
||||
self.unfakehttp()
|
||||
|
||||
def test_userpass_inurl(self):
|
||||
self.fakehttp(b"Hello!")
|
||||
try:
|
||||
fp = urlopen("http://user:pass@python.org/")
|
||||
self.assertEqual(fp.readline(), b"Hello!")
|
||||
self.assertEqual(fp.readline(), b"")
|
||||
self.assertEqual(fp.geturl(), 'http://user:pass@python.org/')
|
||||
self.assertEqual(fp.getcode(), 200)
|
||||
finally:
|
||||
self.unfakehttp()
|
||||
|
||||
class urlretrieve_FileTests(unittest.TestCase):
|
||||
"""Test urllib.urlretrieve() on local files"""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue