mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Added tests for various __repr__() methods.
This commit is contained in:
@@ -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>')
|
||||
|
||||
Reference in New Issue
Block a user