mirror of
https://github.com/django/django.git
synced 2024-12-28 03:55:50 +00:00
0659391baf
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14448 bcc190cf-cafb-0310-a4f2-bffc1f526a37
12 lines
338 B
Python
12 lines
338 B
Python
from django import template
|
|
from django.utils.unittest import TestCase
|
|
|
|
|
|
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"
|
|
)
|