From 911af0d24b8aa83595eecdc5eacfac3fba4ffc9b Mon Sep 17 00:00:00 2001
From: Tim Graham <timograham@gmail.com>
Date: Tue, 27 Feb 2018 11:00:47 -0500
Subject: [PATCH] Added more tests for django.utils.html.urlize().

---
 tests/utils_tests/test_html.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/utils_tests/test_html.py b/tests/utils_tests/test_html.py
index cce29c3fcd..005f4c79b5 100644
--- a/tests/utils_tests/test_html.py
+++ b/tests/utils_tests/test_html.py
@@ -249,6 +249,7 @@ class TestUtilsHtml(SimpleTestCase):
                 lazystr('Search for google.com/?q=!'),
                 'Search for <a href="http://google.com/?q=">google.com/?q=</a>!'
             ),
+            ('foo@example.com', '<a href="mailto:foo@example.com">foo@example.com</a>'),
         )
         for value, output in tests:
             with self.subTest(value=value):
@@ -258,6 +259,11 @@ class TestUtilsHtml(SimpleTestCase):
         tests = (
             ('a' + '@a' * 50000) + 'a',  # simple_email_re catastrophic test
             ('a' + '.' * 1000000) + 'a',  # trailing_punctuation catastrophic test
+            'foo@',
+            '@foo.com',
+            'foo@.example.com',
+            'foo@localhost',
+            'foo@localhost.',
         )
         for value in tests:
             with self.subTest(value=value):