1
0
mirror of https://github.com/django/django.git synced 2025-10-30 17:16:10 +00:00

[2.1.x] Fixed #29400 -- Fixed crash in custom template filters that use decorated functions.

Regression in 620e9dd31a.

Backport of a8d12bc280 from master
This commit is contained in:
Ryan Rubin
2018-05-25 10:11:46 -05:00
committed by Tim Graham
parent 3cca2ab2e7
commit 6b91152a10
5 changed files with 18 additions and 3 deletions

View File

@@ -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):