diff options
| author | Ryan Rubin <ryanmrubin@gmail.com> | 2018-05-25 10:11:46 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-05-25 11:12:03 -0400 |
| commit | 6b91152a103f7c5cbefcf44741e6b03611724714 (patch) | |
| tree | 79114dff2ab4fcd1d007f522c6bad0dcd29f6b58 /tests/template_tests/test_custom.py | |
| parent | 3cca2ab2e7d32eea46ad615b18f7ac1812dbd85b (diff) | |
[2.1.x] Fixed #29400 -- Fixed crash in custom template filters that use decorated functions.
Regression in 620e9dd31a2146d70de740f96a8cb9a6db054fc7.
Backport of a8d12bc28069d56e0306770ab9c73738293663f7 from master
Diffstat (limited to 'tests/template_tests/test_custom.py')
| -rw-r--r-- | tests/template_tests/test_custom.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/template_tests/test_custom.py b/tests/template_tests/test_custom.py index b37b5f8f1e..dbc5bc267d 100644 --- a/tests/template_tests/test_custom.py +++ b/tests/template_tests/test_custom.py @@ -25,6 +25,11 @@ class CustomFilterTests(SimpleTestCase): "abcde" ) + def test_decorated_filter(self): + engine = Engine(libraries=LIBRARIES) + t = engine.from_string('{% load custom %}{{ name|make_data_div }}') + self.assertEqual(t.render(Context({'name': 'foo'})), '<div data-name="foo"></div>') + class TagTestCase(SimpleTestCase): |
