mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-12-03 16:24:01 +03:00
.gov domain handled for different version
This commit is contained in:
parent
1f509639ca
commit
f757520ce9
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user