diff options
| author | Tim Graham <timograham@gmail.com> | 2015-08-18 10:09:17 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-09-23 19:31:09 -0400 |
| commit | 222d0633010e2f37f9fbd2d0559ecc4a5643c738 (patch) | |
| tree | 5f8fce14ce26c2ae0e3548c7a6c07cdc0389082b /tests/utils_tests/test_html.py | |
| parent | 785cc71d5b3300e2702b0b2fc7316e58ca70b563 (diff) | |
Refs #23269 -- Removed the removetags template tag and related functions per deprecation timeline.
Diffstat (limited to 'tests/utils_tests/test_html.py')
| -rw-r--r-- | tests/utils_tests/test_html.py | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/tests/utils_tests/test_html.py b/tests/utils_tests/test_html.py index 298aa304a3..ed026f0a28 100644 --- a/tests/utils_tests/test_html.py +++ b/tests/utils_tests/test_html.py @@ -4,10 +4,9 @@ from __future__ import unicode_literals import os from datetime import datetime -from django.test import SimpleTestCase, ignore_warnings +from django.test import SimpleTestCase from django.utils import html, safestring, six from django.utils._os import upath -from django.utils.deprecation import RemovedInDjango110Warning from django.utils.encoding import force_text @@ -123,25 +122,6 @@ class TestUtilsHtml(SimpleTestCase): for value, output in items: self.check_output(f, value, output) - @ignore_warnings(category=RemovedInDjango110Warning) - def test_strip_entities(self): - f = html.strip_entities - # Strings that should come out untouched. - values = ("&", "&a", "&a", "a&#a") - for value in values: - self.check_output(f, value) - # Valid entities that should be stripped from the patterns. - entities = ("", "", "&a;", "&fdasdfasdfasdf;") - patterns = ( - ("asdf %(entity)s ", "asdf "), - ("%(entity)s%(entity)s", ""), - ("&%(entity)s%(entity)s", "&"), - ("%(entity)s3", "3"), - ) - for entity in entities: - for in_pattern, output in patterns: - self.check_output(f, in_pattern % {'entity': entity}, output) - def test_escapejs(self): f = html.escapejs items = ( @@ -160,16 +140,6 @@ class TestUtilsHtml(SimpleTestCase): for value, output in items: self.check_output(f, value, output) - @ignore_warnings(category=RemovedInDjango110Warning) - def test_remove_tags(self): - f = html.remove_tags - items = ( - ("<b><i>Yes</i></b>", "b i", "Yes"), - ("<a>x</a> <p><b>y</b></p>", "a b", "x <p>y</p>"), - ) - for value, tags, output in items: - self.assertEqual(f(value, tags), output) - def test_smart_urlquote(self): quote = html.smart_urlquote # Ensure that IDNs are properly quoted |
