Skip to content

Commit

Permalink
Removed usage of deprecated removetags in a template test.
Browse files Browse the repository at this point in the history
  • Loading branch information
timgraham committed Jan 18, 2015
1 parent cf5b67d commit b84100e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/template_tests/syntax_tests/test_filter_syntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
from __future__ import unicode_literals

from django.template import TemplateSyntaxError
from django.test import SimpleTestCase, ignore_warnings
from django.utils.deprecation import RemovedInDjango20Warning
from django.test import SimpleTestCase

from ..utils import setup, SomeClass, SomeOtherException, UTF8Class

Expand Down Expand Up @@ -75,14 +74,13 @@ def test_filter_syntax08(self):
with self.assertRaises(TemplateSyntaxError):
self.engine.get_template('filter-syntax08')

@ignore_warnings(category=RemovedInDjango20Warning)
@setup({'filter-syntax09': '{{ var|removetags:"b i"|upper|lower }}'})
@setup({'filter-syntax09': '{{ var|cut:"o"|upper|lower }}'})
def test_filter_syntax09(self):
"""
Chained filters, with an argument to the first one
"""
output = self.engine.render_to_string('filter-syntax09', {'var': '<b><i>Yes</i></b>'})
self.assertEqual(output, 'yes')
output = self.engine.render_to_string('filter-syntax09', {'var': 'Foo'})
self.assertEqual(output, 'f')

@setup({'filter-syntax10': r'{{ var|default_if_none:" endquote\" hah" }}'})
def test_filter_syntax10(self):
Expand Down

0 comments on commit b84100e

Please sign in to comment.