diff options
| author | Tim Graham <timograham@gmail.com> | 2015-08-17 08:57:38 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-09-23 19:31:09 -0400 |
| commit | 57039f9661d2fc06618bba1ed60d005212ee26e3 (patch) | |
| tree | 6c0a927182ad01f42bb6b9abadf1b9002eaef6c3 /tests/template_tests/syntax_tests | |
| parent | c64dd646f5b6955ca09e0509a6e2ffabfa97d935 (diff) | |
Refs #22306 -- Removed cycle/firstof template tags from "future".
Per deprecation timeline.
Diffstat (limited to 'tests/template_tests/syntax_tests')
| -rw-r--r-- | tests/template_tests/syntax_tests/test_cycle.py | 11 | ||||
| -rw-r--r-- | tests/template_tests/syntax_tests/test_firstof.py | 17 |
2 files changed, 8 insertions, 20 deletions
diff --git a/tests/template_tests/syntax_tests/test_cycle.py b/tests/template_tests/syntax_tests/test_cycle.py index 7e9f7c3c8d..9b2c8abe10 100644 --- a/tests/template_tests/syntax_tests/test_cycle.py +++ b/tests/template_tests/syntax_tests/test_cycle.py @@ -6,7 +6,6 @@ from ..utils import setup class CycleTagTests(SimpleTestCase): - libraries = {'future': 'django.templatetags.future'} @setup({'cycle01': '{% cycle a %}'}) def test_cycle01(self): @@ -146,21 +145,17 @@ class CycleTagTests(SimpleTestCase): output = self.engine.render_to_string('cycle25', {'a': '<'}) self.assertEqual(output, '<') - @ignore_warnings(category=RemovedInDjango110Warning) - @setup({'cycle26': '{% load cycle from future %}{% cycle a b as ab %}{% cycle ab %}'}) + @setup({'cycle26': '{% cycle a b as ab %}{% cycle ab %}'}) def test_cycle26(self): output = self.engine.render_to_string('cycle26', {'a': '<', 'b': '>'}) self.assertEqual(output, '<>') - @ignore_warnings(category=RemovedInDjango110Warning) - @setup({'cycle27': '{% load cycle from future %}' - '{% autoescape off %}{% cycle a b as ab %}{% cycle ab %}{% endautoescape %}'}) + @setup({'cycle27': '{% autoescape off %}{% cycle a b as ab %}{% cycle ab %}{% endautoescape %}'}) def test_cycle27(self): output = self.engine.render_to_string('cycle27', {'a': '<', 'b': '>'}) self.assertEqual(output, '<>') - @ignore_warnings(category=RemovedInDjango110Warning) - @setup({'cycle28': '{% load cycle from future %}{% cycle a|safe b as ab %}{% cycle ab %}'}) + @setup({'cycle28': '{% cycle a|safe b as ab %}{% cycle ab %}'}) def test_cycle28(self): output = self.engine.render_to_string('cycle28', {'a': '<', 'b': '>'}) self.assertEqual(output, '<>') diff --git a/tests/template_tests/syntax_tests/test_firstof.py b/tests/template_tests/syntax_tests/test_firstof.py index c25a1854c3..1f382a6db3 100644 --- a/tests/template_tests/syntax_tests/test_firstof.py +++ b/tests/template_tests/syntax_tests/test_firstof.py @@ -1,12 +1,10 @@ from django.template import TemplateSyntaxError -from django.test import SimpleTestCase, ignore_warnings -from django.utils.deprecation import RemovedInDjango110Warning +from django.test import SimpleTestCase from ..utils import setup class FirstOfTagTests(SimpleTestCase): - libraries = {'future': 'django.templatetags.future'} @setup({'firstof01': '{% firstof a b c %}'}) def test_firstof01(self): @@ -58,27 +56,22 @@ class FirstOfTagTests(SimpleTestCase): output = self.engine.render_to_string('firstof10', {'a': '<'}) self.assertEqual(output, '<') - @ignore_warnings(category=RemovedInDjango110Warning) - @setup({'firstof11': '{% load firstof from future %}{% firstof a b %}'}) + @setup({'firstof11': '{% firstof a b %}'}) def test_firstof11(self): output = self.engine.render_to_string('firstof11', {'a': '<', 'b': '>'}) self.assertEqual(output, '<') - @ignore_warnings(category=RemovedInDjango110Warning) - @setup({'firstof12': '{% load firstof from future %}{% firstof a b %}'}) + @setup({'firstof12': '{% firstof a b %}'}) def test_firstof12(self): output = self.engine.render_to_string('firstof12', {'a': '', 'b': '>'}) self.assertEqual(output, '>') - @ignore_warnings(category=RemovedInDjango110Warning) - @setup({'firstof13': '{% load firstof from future %}' - '{% autoescape off %}{% firstof a %}{% endautoescape %}'}) + @setup({'firstof13': '{% autoescape off %}{% firstof a %}{% endautoescape %}'}) def test_firstof13(self): output = self.engine.render_to_string('firstof13', {'a': '<'}) self.assertEqual(output, '<') - @ignore_warnings(category=RemovedInDjango110Warning) - @setup({'firstof14': '{% load firstof from future %}{% firstof a|safe b %}'}) + @setup({'firstof14': '{% firstof a|safe b %}'}) def test_firstof14(self): output = self.engine.render_to_string('firstof14', {'a': '<'}) self.assertEqual(output, '<') |
