diff options
Diffstat (limited to 'parts/django/tests/regressiontests/templates/custom.py')
-rw-r--r-- | parts/django/tests/regressiontests/templates/custom.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/parts/django/tests/regressiontests/templates/custom.py b/parts/django/tests/regressiontests/templates/custom.py new file mode 100644 index 0000000..b346198 --- /dev/null +++ b/parts/django/tests/regressiontests/templates/custom.py @@ -0,0 +1,12 @@ +from unittest import TestCase + +from django import template + + +class CustomTests(TestCase): + def test_filter(self): + t = template.Template("{% load custom %}{{ string|trim:5 }}") + self.assertEqual( + t.render(template.Context({"string": "abcdefghijklmnopqrstuvwxyz"})), + u"abcde" + ) |