Modify URL test cases for Django version compatibility

Adjust URL test cases based on Django version.
This commit is contained in:
Mehraz Hossain Rumman 2025-11-06 12:38:58 +06:00 committed by GitHub
parent 71cac840d3
commit 813ee9de3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -249,8 +249,9 @@ class Issue1386Tests(TestCase):
"asdf.com",
"asdf.net",
"www.as_df.org",
"as.d8f.ghj8.gov",
]
if django.VERSION < (5, 3):
correct_urls.append("as.d8f.ghj8.gov")
for i in correct_urls:
res = urlize(i)
self.assertNotEqual(res, i)
@ -260,6 +261,8 @@ class Issue1386Tests(TestCase):
"mailto://asdf@fdf.com",
"asdf.netnet",
]
if django.VERSION >= (5, 3):
incorrect_urls.append("as.d8f.ghj8.gov")
for i in incorrect_urls:
res = urlize(i)
self.assertEqual(i, res)