Skip to content

Commit f757520

Browse files
committed
.gov domain handled for different version
1 parent 1f50963 commit f757520

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_templatetags.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import unittest
22

3+
import django
34
from django.template import Context, Template
45
from django.test import TestCase, override_settings
56
from django.utils.html import urlize
@@ -250,6 +251,8 @@ def test_issue_1386(self):
250251
"asdf.net",
251252
"www.as_df.org",
252253
]
254+
if django.VERSION < (5, 3):
255+
correct_urls.append("as.d8f.ghj8.gov")
253256
for i in correct_urls:
254257
res = urlize(i)
255258
self.assertNotEqual(res, i)
@@ -259,6 +262,8 @@ def test_issue_1386(self):
259262
"mailto://[email protected]",
260263
"asdf.netnet",
261264
]
265+
if django.VERSION >= (5, 3):
266+
incorrect_urls.append("as.d8f.ghj8.gov")
262267
for i in incorrect_urls:
263268
res = urlize(i)
264269
self.assertEqual(i, res)

0 commit comments

Comments
 (0)