blob: 187aa4e7abaa2b4eb62ac72410ca1534a6aa3b05 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
from __future__ import unicode_literals
from django.test import SimpleTestCase
from ...utils import setup
class GetAvailableLanguagesTagTests(SimpleTestCase):
libraries = {'i18n': 'django.templatetags.i18n'}
@setup({'i18n12': '{% load i18n %}'
'{% get_available_languages as langs %}{% for lang in langs %}'
'{% if lang.0 == "de" %}{{ lang.0 }}{% endif %}{% endfor %}'})
def test_i18n12(self):
output = self.engine.render_to_string('i18n12')
self.assertEqual(output, 'de')
|