Commit 84da8078 authored by Michal Čihař's avatar Michal Čihař

Coding style improvements

parent b3122817
......@@ -18,12 +18,16 @@ class LanguagesTest(TestCase):
('ar_AA', 'ar', 'rtl'),
('ar_XX', 'ar_XX', 'rtl'),
)
def test_auto_create(self):
"""
Tests that auto create correctly handles languages
"""
for original, expected, direction in self.TEST_LANGUAGES:
self.assertEqual(Language.objects.auto_get_or_create(original).code, expected)
self.assertEqual(
Language.objects.auto_get_or_create(original).code,
expected
)
def test_rtl(self):
'''
......@@ -36,7 +40,7 @@ class LanguagesTest(TestCase):
self.assertIn(expected, lang.get_html())
def test_plurals(self):
lang = Language.objects.get(code = 'cs')
lang = Language.objects.get(code='cs')
self.assertEqual(
lang.get_plural_form(),
'nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment