1
0
mirror of https://github.com/django/django.git synced 2025-10-30 17:16:10 +00:00

Increased test coverage for i18n template tags.

This commit is contained in:
Mads Jensen
2018-03-21 08:20:04 +01:00
committed by Tim Graham
parent c76d87427d
commit bb79e480e1
7 changed files with 101 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
from template_tests.utils import setup
from django.template import TemplateSyntaxError
from django.test import SimpleTestCase
class I18nLanguageTagTests(SimpleTestCase):
libraries = {'i18n': 'django.templatetags.i18n'}
@setup({'i18n_language': '{% load i18n %} {% language %} {% endlanguage %}'})
def test_no_arg(self):
with self.assertRaisesMessage(TemplateSyntaxError, "'language' takes one argument (language)"):
self.engine.render_to_string('i18n_language')