From 813ee9de3d626a434419d92baa07daf988934d50 Mon Sep 17 00:00:00 2001 From: Mehraz Hossain Rumman <59512321+MehrazRumman@users.noreply.github.com> Date: Thu, 6 Nov 2025 12:38:58 +0600 Subject: [PATCH] Modify URL test cases for Django version compatibility Adjust URL test cases based on Django version. --- tests/test_templatetags.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_templatetags.py b/tests/test_templatetags.py index 8260fc839..4822ea3c5 100644 --- a/tests/test_templatetags.py +++ b/tests/test_templatetags.py @@ -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)