diff options
| author | Mads Jensen <mje@inducks.org> | 2017-02-04 11:43:14 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-02-04 11:29:39 -0500 |
| commit | ce69a421f6122efa7d14cc33a983553dd39b844c (patch) | |
| tree | 478c1217ac88e3e91c77801f2d7a8c71582b4b83 /tests/template_tests/syntax_tests/i18n/test_trans.py | |
| parent | 2d899ce16bdbef1a015275237f0bfef4045fb6b2 (diff) | |
Added tests for various __repr__() methods.
Diffstat (limited to 'tests/template_tests/syntax_tests/i18n/test_trans.py')
| -rw-r--r-- | tests/template_tests/syntax_tests/i18n/test_trans.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/template_tests/syntax_tests/i18n/test_trans.py b/tests/template_tests/syntax_tests/i18n/test_trans.py index fec9f1728d..ba5021a5d5 100644 --- a/tests/template_tests/syntax_tests/i18n/test_trans.py +++ b/tests/template_tests/syntax_tests/i18n/test_trans.py @@ -1,6 +1,7 @@ from threading import local from django.template import Context, Template, TemplateSyntaxError +from django.templatetags.l10n import LocalizeNode from django.test import SimpleTestCase, override_settings from django.utils import translation from django.utils.safestring import mark_safe @@ -203,3 +204,9 @@ class MultipleLocaleActivationTransTagTests(MultipleLocaleActivationTestCase): t = Template("{% load i18n %}{% trans 'No' %}") with translation.override('nl'): self.assertEqual(t.render(Context({})), 'Nee') + + +class LocalizeNodeTests(SimpleTestCase): + def test_repr(self): + node = LocalizeNode(nodelist=[], use_l10n=True) + self.assertEqual(repr(node), '<LocalizeNode>') |
