diff options
| author | Ezio Melotti <ezio.melotti@gmail.com> | 2012-05-19 14:12:17 (GMT) |
|---|---|---|
| committer | Ezio Melotti <ezio.melotti@gmail.com> | 2012-05-19 14:12:17 (GMT) |
| commit | 6d9c1b1617b30ee24eaa358f4142706148d21922 (patch) | |
| tree | b0d0a64a88c1a77eda61fbaf79e2a6036a922c64 /Lib/test/test_urlparse.py | |
| parent | 618802d55e19c1f2da28c9409256a7f2fbf59e99 (diff) | |
| download | cpython-6d9c1b1617b30ee24eaa358f4142706148d21922.zip cpython-6d9c1b1617b30ee24eaa358f4142706148d21922.tar.gz cpython-6d9c1b1617b30ee24eaa358f4142706148d21922.tar.bz2 | |
#14072: Fix parsing of tel URIs in urlparse by making the check for ports stricter.
Diffstat (limited to 'Lib/test/test_urlparse.py')
| -rw-r--r-- | Lib/test/test_urlparse.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py index 827282c..e484aaf 100644 --- a/Lib/test/test_urlparse.py +++ b/Lib/test/test_urlparse.py @@ -437,6 +437,13 @@ class UrlParseTestCase(unittest.TestCase): self.assertEqual(p.port, 80) self.assertEqual(p.geturl(), url) + def test_issue14072(self): + p1 = urlparse.urlsplit('tel:+31-641044153') + self.assertEqual(p1.scheme, 'tel') + self.assertEqual(p1.path, '+31-641044153') + p2 = urlparse.urlsplit('tel:+31641044153') + self.assertEqual(p2.scheme, 'tel') + self.assertEqual(p2.path, '+31641044153') def test_attributes_bad_port(self): """Check handling of non-integer ports.""" |
