summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2012-01-08 16:08:43 +0000
committerAymeric Augustin <aymeric.augustin@m4x.org>2012-01-08 16:08:43 +0000
commit05a3ecbf9637b8873dc0eb6913a94117a90c9bc0 (patch)
treef9a71d1abdd00aa835f54b8185d7fae1b0a4aabc /tests
parent27508918fbbbfda6f5e3b697bbea6bf2c4a6b8b8 (diff)
Fixed #16656 -- Changed the urlize filter to accept more top-level domains.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17359 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/defaultfilters/tests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/regressiontests/defaultfilters/tests.py b/tests/regressiontests/defaultfilters/tests.py
index 2f3d012346..d79965fee1 100644
--- a/tests/regressiontests/defaultfilters/tests.py
+++ b/tests/regressiontests/defaultfilters/tests.py
@@ -276,6 +276,12 @@ class DefaultFiltersTests(TestCase):
self.assertEqual(urlize('http://@foo.com'),
u'http://@foo.com')
+ # Check urlize accepts more TLDs - see #16656
+ self.assertEqual(urlize('usa.gov'),
+ u'<a href="http://usa.gov" rel="nofollow">usa.gov</a>')
+ self.assertEqual(urlize('europa.eu'),
+ u'<a href="http://europa.eu" rel="nofollow">europa.eu</a>')
+
def test_wordcount(self):
self.assertEqual(wordcount(''), 0)
self.assertEqual(wordcount(u'oneword'), 1)