1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #25571 -- Fixed boolean evaluation of ungettext_lazy

This commit is contained in:
Claude Paroz
2015-10-19 21:46:55 +02:00
parent 1ce11f6064
commit 8b5acda821
2 changed files with 10 additions and 0 deletions

View File

@@ -227,6 +227,10 @@ class TranslationTests(SimpleTestCase):
)
self.assertEqual(result % {'name': 'Joe', 'num': 4}, "Joe has 4 good results")
def test_ungettext_lazy_bool(self):
self.assertTrue(ungettext_lazy('%d good result', '%d good results'))
self.assertFalse(ungettext_lazy('', ''))
@override_settings(LOCALE_PATHS=extended_locale_paths)
def test_pgettext(self):
trans_real._active = local()