diff --git a/tests/template_tests/filter_tests/test_yesno.py b/tests/template_tests/filter_tests/test_yesno.py index c496a600ee..70b383a2b6 100644 --- a/tests/template_tests/filter_tests/test_yesno.py +++ b/tests/template_tests/filter_tests/test_yesno.py @@ -1,6 +1,15 @@ from django.template.defaultfilters import yesno from django.test import SimpleTestCase +from ..utils import setup + + +class YesNoTests(SimpleTestCase): + @setup({'t': '{{ var|yesno:"yup,nup,mup" }} {{ var|yesno }}'}) + def test_true(self): + output = self.engine.render_to_string('t', {'var': True}) + self.assertEqual(output, 'yup yes') + class FunctionTests(SimpleTestCase): diff --git a/tests/template_tests/syntax_tests/test_filter_syntax.py b/tests/template_tests/syntax_tests/test_filter_syntax.py index 176475c04c..f6f2857df8 100644 --- a/tests/template_tests/syntax_tests/test_filter_syntax.py +++ b/tests/template_tests/syntax_tests/test_filter_syntax.py @@ -109,14 +109,6 @@ class FilterSyntaxTests(SimpleTestCase): output = self.engine.render_to_string('filter-syntax11', {"var": None, "var2": "happy"}) self.assertEqual(output, 'happy') - @setup({'filter-syntax12': r'{{ var|yesno:"yup,nup,mup" }} {{ var|yesno }}'}) - def test_filter_syntax12(self): - """ - Default argument testing - """ - output = self.engine.render_to_string('filter-syntax12', {"var": True}) - self.assertEqual(output, 'yup yes') - @setup({'filter-syntax13': r'1{{ var.method3 }}2'}) def test_filter_syntax13(self): """