mirror of
https://github.com/django/django.git
synced 2025-08-02 18:13:02 +00:00
Added tests for various __repr__() methods.
This commit is contained in:
parent
2d899ce16b
commit
ce69a421f6
6 changed files with 69 additions and 1 deletions
|
@ -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>')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue