diff options
author | Benjamin Peterson <benjamin@python.org> | 2011-04-12 23:34:06 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2011-04-12 23:34:06 (GMT) |
commit | abdeeff3d1fa505fa1d49970cb7a70446f3e2b75 (patch) | |
tree | 23131ed5d3928e8056f1cc28c6818b3ac43dd73a /Lib/test/test_urllib.py | |
parent | bd3e362089c9fab1028a1bf58b4e762851a32244 (diff) | |
parent | 26430419703f925a9b6206ec96780ae899b6dd06 (diff) | |
download | cpython-abdeeff3d1fa505fa1d49970cb7a70446f3e2b75.zip cpython-abdeeff3d1fa505fa1d49970cb7a70446f3e2b75.tar.gz cpython-abdeeff3d1fa505fa1d49970cb7a70446f3e2b75.tar.bz2 |
merge heads
Diffstat (limited to 'Lib/test/test_urllib.py')
-rw-r--r-- | Lib/test/test_urllib.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index 2b88521..462a2b0 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -171,6 +171,16 @@ class urlopen_HttpTests(unittest.TestCase): finally: self.unfakehttp() + def test_url_fragment(self): + # Issue #11703: geturl() omits fragments in the original URL. + url = 'http://docs.python.org/library/urllib.html#OK' + self.fakehttp(b'Hello!') + try: + fp = urllib.request.urlopen(url) + self.assertEqual(fp.geturl(), url) + finally: + self.unfakehttp() + def test_read_bogus(self): # urlopen() should raise IOError for many error codes. self.fakehttp(b'''HTTP/1.1 401 Authentication Required |