mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
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:
parent
dc3e6cc452
commit
8307075ce8
4 changed files with 35 additions and 2 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue