diff options
Diffstat (limited to 'tests/template_tests/syntax_tests')
| -rw-r--r-- | tests/template_tests/syntax_tests/test_firstof.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/template_tests/syntax_tests/test_firstof.py b/tests/template_tests/syntax_tests/test_firstof.py index 2c227f2304..a3c8c83151 100644 --- a/tests/template_tests/syntax_tests/test_firstof.py +++ b/tests/template_tests/syntax_tests/test_firstof.py @@ -81,3 +81,10 @@ class FirstOfTagTests(SimpleTestCase): def test_firstof14(self): output = self.engine.render_to_string('firstof14', {'a': '<'}) self.assertEqual(output, '<') + + @setup({'firstof15': '{% firstof a b c as myvar %}'}) + def test_firstof15(self): + ctx = {'a': 0, 'b': 2, 'c': 3} + output = self.engine.render_to_string('firstof15', ctx) + self.assertEqual(ctx['myvar'], '2') + self.assertEqual(output, '') |
