mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-36742: Corrects fix to handle decomposition in usernames (#13812)
This commit is contained in:
parent
800d786370
commit
8d0ef0b5ed
2 changed files with 9 additions and 8 deletions
|
@ -1018,11 +1018,12 @@ class UrlParseTestCase(unittest.TestCase):
|
|||
urllib.parse.urlsplit('http://\u30d5\u309a\ufe1380')
|
||||
|
||||
for scheme in ["http", "https", "ftp"]:
|
||||
for c in denorm_chars:
|
||||
url = "{}://netloc{}false.netloc/path".format(scheme, c)
|
||||
with self.subTest(url=url, char='{:04X}'.format(ord(c))):
|
||||
with self.assertRaises(ValueError):
|
||||
urllib.parse.urlsplit(url)
|
||||
for netloc in ["netloc{}false.netloc", "n{}user@netloc"]:
|
||||
for c in denorm_chars:
|
||||
url = "{}://{}/path".format(scheme, netloc.format(c))
|
||||
with self.subTest(url=url, char='{:04X}'.format(ord(c))):
|
||||
with self.assertRaises(ValueError):
|
||||
urllib.parse.urlsplit(url)
|
||||
|
||||
class Utility_Tests(unittest.TestCase):
|
||||
"""Testcase to test the various utility functions in the urllib."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue