summaryrefslogtreecommitdiff
path: root/Lib/test/test_urllib2net.py
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-08-08 11:43:45 +0000
committerSenthil Kumaran <orsenthil@gmail.com>2010-08-08 11:43:45 +0000
commitb4ec7ee486c571694ece406d38259054983b091b (patch)
treeb544684a4f606201a8d53aa60a63c38ae32027f4 /Lib/test/test_urllib2net.py
parent431774f32a22a4bdfc5a239709bcba3e8d7045e9 (diff)
downloadcpython-git-b4ec7ee486c571694ece406d38259054983b091b.tar.gz
Merged revisions 83818 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83818 | senthil.kumaran | 2010-08-08 16:57:53 +0530 (Sun, 08 Aug 2010) | 4 lines Fix Issue8280 - urllib2's Request method will remove fragements in the url. This is how it should work,wget and curl work like this way too. Old behavior was wrong. ........
Diffstat (limited to 'Lib/test/test_urllib2net.py')
-rw-r--r--Lib/test/test_urllib2net.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_urllib2net.py b/Lib/test/test_urllib2net.py
index d2762dcf02..4da38eff24 100644
--- a/Lib/test/test_urllib2net.py
+++ b/Lib/test/test_urllib2net.py
@@ -154,6 +154,13 @@ class OtherNetworkTests(unittest.TestCase):
## self._test_urls(urls, self._extra_handlers()+[bauth, dauth])
+ def test_urlwithfrag(self):
+ urlwith_frag = "http://docs.python.org/glossary.html#glossary"
+ req = urllib2.Request(urlwith_frag)
+ res = urllib2.urlopen(req)
+ self.assertEqual(res.geturl(),
+ "http://docs.python.org/glossary.html")
+
def _test_urls(self, urls, handlers, retry=True):
import time
import logging