mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #29400 -- Fixed crash in custom template filters that use decorated functions.
Regression in 620e9dd31a.
This commit is contained in:
@@ -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):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user