diff options
author | Guido van Rossum <guido@python.org> | 2008-01-05 22:19:06 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2008-01-05 22:19:06 +0000 |
commit | c6a04c2629c43b104b81e8584be21aa1b8bae77f (patch) | |
tree | 4eed51ce7065079de67ed04f4674cd58240c5b0d /Lib/test/test_urlparse.py | |
parent | 3001c5463ecfb8fe17b434733b1bfc399b89e80e (diff) | |
download | cpython-git-c6a04c2629c43b104b81e8584be21aa1b8bae77f.tar.gz |
Patch #1637: fix urlparse for URLs like 'http://x.com?arg=/foo'.
Fix by John Nagle.
Diffstat (limited to 'Lib/test/test_urlparse.py')
-rw-r--r-- | Lib/test/test_urlparse.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py index bf9e317684..fff8408d60 100644 --- a/Lib/test/test_urlparse.py +++ b/Lib/test/test_urlparse.py @@ -316,6 +316,11 @@ class UrlParseTestCase(unittest.TestCase): self.assertEqual(type(p.hostname), type(uri)) self.assertEqual(type(p.path), type(uri)) + def test_noslash(self): + # Issue 1637: http://foo.com?query is legal + self.assertEqual(urlparse.urlparse("http://example.com?blahblah=/foo"), + ('http', 'example.com', '', '', 'blahblah=/foo', '')) + def test_main(): test_support.run_unittest(UrlParseTestCase) |