Removed usage of deprecated removetags in a template test.

This commit is contained in:
Tim Graham 2015-01-18 18:32:47 -05:00
parent cf5b67d3a0
commit b84100e8e2
1 changed files with 4 additions and 6 deletions

View File

@ -2,8 +2,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
from django.template import TemplateSyntaxError from django.template import TemplateSyntaxError
from django.test import SimpleTestCase, ignore_warnings from django.test import SimpleTestCase
from django.utils.deprecation import RemovedInDjango20Warning
from ..utils import setup, SomeClass, SomeOtherException, UTF8Class from ..utils import setup, SomeClass, SomeOtherException, UTF8Class
@ -75,14 +74,13 @@ class FilterSyntaxTests(SimpleTestCase):
with self.assertRaises(TemplateSyntaxError): with self.assertRaises(TemplateSyntaxError):
self.engine.get_template('filter-syntax08') self.engine.get_template('filter-syntax08')
@ignore_warnings(category=RemovedInDjango20Warning) @setup({'filter-syntax09': '{{ var|cut:"o"|upper|lower }}'})
@setup({'filter-syntax09': '{{ var|removetags:"b i"|upper|lower }}'})
def test_filter_syntax09(self): def test_filter_syntax09(self):
""" """
Chained filters, with an argument to the first one Chained filters, with an argument to the first one
""" """
output = self.engine.render_to_string('filter-syntax09', {'var': '<b><i>Yes</i></b>'}) output = self.engine.render_to_string('filter-syntax09', {'var': 'Foo'})
self.assertEqual(output, 'yes') self.assertEqual(output, 'f')
@setup({'filter-syntax10': r'{{ var|default_if_none:" endquote\" hah" }}'}) @setup({'filter-syntax10': r'{{ var|default_if_none:" endquote\" hah" }}'})
def test_filter_syntax10(self): def test_filter_syntax10(self):