From 9a891c387f752b1fa7c4d7b436cd8491e8f16eca Mon Sep 17 00:00:00 2001 From: Mike Edmunds Date: Thu, 12 Dec 2024 17:30:20 -0800 Subject: [PATCH] Refs #36007 -- Added IDNA 2008 test case for URLValidator. Test a domain that is valid under IDNA 2008 but not IDNA 2003. This helps verify that the branch in URLValidator which calls punycode() is not actually being used for IDNs. punycode() implements IDNA 2003, so the domain would fail to validate if that branch were active for IDNs. --- tests/validators/tests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/validators/tests.py b/tests/validators/tests.py index 4ae0f6413e..7455c93d40 100644 --- a/tests/validators/tests.py +++ b/tests/validators/tests.py @@ -126,6 +126,7 @@ VALID_URLS = [ "http://مثال.إختبار", "http://例子.测试", "http://उदाहरण.परीक्षा", + "https://މިހާރު.com", # (valid in IDNA 2008 but not IDNA 2003) "http://-.~_!$&'()*+,;=%40:80%2f@example.com", "http://xn--7sbb4ac0ad0be6cf.xn--p1ai", "http://1337.net",