diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2011-04-12 23:24:32 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2011-04-12 23:24:32 (GMT) |
commit | 1cea9a0227213d1ad914e1d6ce69acf5792756f5 (patch) | |
tree | 4a8f8b0eecd8f701f7d75820cc8063b064fed7b0 /Lib/test/test_urllib.py | |
parent | 1f817f7eb7edeae05b2ec641b235776c0507be5d (diff) | |
parent | b17abb1af9e36c728e4fc9e27a9fd9441d3f77a2 (diff) | |
download | cpython-1cea9a0227213d1ad914e1d6ce69acf5792756f5.zip cpython-1cea9a0227213d1ad914e1d6ce69acf5792756f5.tar.gz cpython-1cea9a0227213d1ad914e1d6ce69acf5792756f5.tar.bz2 |
merge from 3.2
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 b85005f..526760d 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -175,6 +175,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"HTTP/1.1 200 OK\r\n\r\nHello!") + try: + fp = urllib.request.urlopen(url) + self.assertEqual(fp.geturl(), url) + finally: + self.unfakehttp() + def test_willclose(self): self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello!") try: |