diff options
author | Steve Dower <steve.dower@python.org> | 2019-06-04 15:55:30 (GMT) |
---|---|---|
committer | Ćukasz Langa <lukasz@langa.pl> | 2019-06-04 15:55:29 (GMT) |
commit | 8d0ef0b5edeae52960c7ed05ae8a12388324f87e (patch) | |
tree | 2efb997f81c7e84a3864f39157661cb0bf06f06f /Lib/test/test_urlparse.py | |
parent | 800d78637034d77c099d49c4fe99e1fe773da700 (diff) | |
download | cpython-8d0ef0b5edeae52960c7ed05ae8a12388324f87e.zip cpython-8d0ef0b5edeae52960c7ed05ae8a12388324f87e.tar.gz cpython-8d0ef0b5edeae52960c7ed05ae8a12388324f87e.tar.bz2 |
bpo-36742: Corrects fix to handle decomposition in usernames (#13812)
Diffstat (limited to 'Lib/test/test_urlparse.py')
-rw-r--r-- | Lib/test/test_urlparse.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py index 4344765..4ae6ed3 100644 --- a/Lib/test/test_urlparse.py +++ b/Lib/test/test_urlparse.py @@ -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.""" |