mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
#14072: Fix parsing of tel URIs in urlparse by making the check for ports stricter.
This commit is contained in:
parent
618802d55e
commit
6d9c1b1617
3 changed files with 16 additions and 6 deletions
|
@ -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."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue