blob: b3461988747557bc0f6225d38da3a06a94472fa9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
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"
)
|