summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/defaultfilters/tests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/defaultfilters/tests.py b/tests/defaultfilters/tests.py
index 8596f8c801..21734faf95 100644
--- a/tests/defaultfilters/tests.py
+++ b/tests/defaultfilters/tests.py
@@ -314,6 +314,11 @@ class DefaultFiltersTests(TestCase):
self.assertEqual(urlize('see test[at[example.com'),
'see <a href="http://test[at[example.com" rel="nofollow">test[at[example.com</a>' )
+ # Check urlize works with IPv4/IPv6 addresses
+ self.assertEqual(urlize('http://192.168.0.15/api/9'),
+ '<a href="http://192.168.0.15/api/9" rel="nofollow">http://192.168.0.15/api/9</a>')
+ self.assertEqual(urlize('http://[2001:db8:cafe::2]/api/9'),
+ '<a href="http://[2001:db8:cafe::2]/api/9" rel="nofollow">http://[2001:db8:cafe::2]/api/9</a>')
def test_wordcount(self):
self.assertEqual(wordcount(''), 0)