diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2011-04-12 23:22:29 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2011-04-12 23:22:29 (GMT) |
commit | b17abb1af9e36c728e4fc9e27a9fd9441d3f77a2 (patch) | |
tree | 7e424e947cbf556f5b39cc97dc2d22d66333155f /Lib/test/test_urllib.py | |
parent | a3e449da3757a87945d62d104cb53ff8a8646257 (diff) | |
parent | 26430419703f925a9b6206ec96780ae899b6dd06 (diff) | |
download | cpython-b17abb1af9e36c728e4fc9e27a9fd9441d3f77a2.zip cpython-b17abb1af9e36c728e4fc9e27a9fd9441d3f77a2.tar.gz cpython-b17abb1af9e36c728e4fc9e27a9fd9441d3f77a2.tar.bz2 |
merge from 3.1
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 11e5dad..275b2eb 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: |