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.
This commit is contained in:
Senthil Kumaran 2013-05-24 09:14:12 -07:00
parent dc3e6cc452
commit 8307075ce8
4 changed files with 35 additions and 2 deletions

View file

@ -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):