Skip to content

Commit 813ee9d

Browse files
authored
Modify URL test cases for Django version compatibility
Adjust URL test cases based on Django version.
1 parent 71cac84 commit 813ee9d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_templatetags.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,9 @@ def test_issue_1386(self):
249249
"asdf.com",
250250
"asdf.net",
251251
"www.as_df.org",
252-
"as.d8f.ghj8.gov",
253252
]
253+
if django.VERSION < (5, 3):
254+
correct_urls.append("as.d8f.ghj8.gov")
254255
for i in correct_urls:
255256
res = urlize(i)
256257
self.assertNotEqual(res, i)
@@ -260,6 +261,8 @@ def test_issue_1386(self):
260261
"mailto://[email protected]",
261262
"asdf.netnet",
262263
]
264+
if django.VERSION >= (5, 3):
265+
incorrect_urls.append("as.d8f.ghj8.gov")
263266
for i in incorrect_urls:
264267
res = urlize(i)
265268
self.assertEqual(i, res)

0 commit comments

Comments
 (0)