parts/django/tests/regressiontests/templates/custom.py
changeset 69 c6bca38c1cbf
equal deleted inserted replaced
68:5ff1fc726848 69:c6bca38c1cbf
       
     1 from unittest import TestCase
       
     2 
       
     3 from django import template
       
     4 
       
     5 
       
     6 class CustomTests(TestCase):
       
     7     def test_filter(self):
       
     8         t = template.Template("{% load custom %}{{ string|trim:5 }}")
       
     9         self.assertEqual(
       
    10             t.render(template.Context({"string": "abcdefghijklmnopqrstuvwxyz"})),
       
    11             u"abcde"
       
    12         )