From f757520ce95326c1e91c018144046db773fb67c8 Mon Sep 17 00:00:00 2001 From: MehrazRumman Date: Wed, 5 Nov 2025 18:48:54 +0600 Subject: [PATCH] .gov domain handled for different version --- tests/test_templatetags.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_templatetags.py b/tests/test_templatetags.py index a4cdb344a..072796628 100644 --- a/tests/test_templatetags.py +++ b/tests/test_templatetags.py @@ -1,5 +1,6 @@ import unittest +import django from django.template import Context, Template from django.test import TestCase, override_settings from django.utils.html import urlize @@ -250,6 +251,8 @@ class Issue1386Tests(TestCase): "asdf.net", "www.as_df.org", ] + if django.VERSION < (5, 3): + correct_urls.append("as.d8f.ghj8.gov") for i in correct_urls: res = urlize(i) self.assertNotEqual(res, i) @@ -259,6 +262,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)