summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib2net.py
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2013-05-24 16:14:12 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2013-05-24 16:14:12 (GMT)
commit8307075ce870375f1d1f7344972f78f9c42b39e8 (patch)
tree19fd346ea71cf5fdfed95c5b99a96ffc4cce973a /Lib/test/test_urllib2net.py
parentdc3e6cc452a2a4409a4d12804fab4e474abbf9ff (diff)
downloadcpython-8307075ce870375f1d1f7344972f78f9c42b39e8.zip
cpython-8307075ce870375f1d1f7344972f78f9c42b39e8.tar.gz
cpython-8307075ce870375f1d1f7344972f78f9c42b39e8.tar.bz2
Fix #17272 - Make Request.full_url and Request.get_full_url return same result under all circumstances.
Document the change of Request.full_url to a property.
Diffstat (limited to 'Lib/test/test_urllib2net.py')
-rw-r--r--Lib/test/test_urllib2net.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_urllib2net.py b/Lib/test/test_urllib2net.py
index e276d2e..b674be0 100644
--- a/Lib/test/test_urllib2net.py
+++ b/Lib/test/test_urllib2net.py
@@ -164,6 +164,14 @@ class OtherNetworkTests(unittest.TestCase):
self.assertEqual(res.geturl(),
"http://docs.python.org/2/glossary.html#glossary")
+ def test_redirect_url_withfrag(self):
+ redirect_url_with_frag = "http://bitly.com/urllibredirecttest"
+ with support.transient_internet(redirect_url_with_frag):
+ req = urllib.request.Request(redirect_url_with_frag)
+ res = urllib.request.urlopen(req)
+ self.assertEqual(res.geturl(),
+ "http://docs.python.org/3.4/glossary.html#term-global-interpreter-lock")
+
def test_custom_headers(self):
url = "http://www.example.com"
with support.transient_internet(url):