From 0637a5e2ea44edb768f70525695a89da3ecca8e2 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 2 Oct 2016 22:43:20 +0300 Subject: [PATCH] Add test_translations --- tests/test_translations.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/test_translations.py diff --git a/tests/test_translations.py b/tests/test_translations.py new file mode 100644 index 0000000..313d6d6 --- /dev/null +++ b/tests/test_translations.py @@ -0,0 +1,17 @@ +# coding: utf-8 + +import os +save_locale = os.environ.get('LC_CTYPE') +os.environ['LC_CTYPE'] = 'ru_RU' + +from m_librarian.translations import translations # noqa + +if save_locale: + os.environ['LC_CTYPE'] = save_locale + +_ = getattr(translations, 'ugettext', None) or translations.gettext + + +def test_translations(): + assert _('xxx') == u'xxx' + assert _('File') == u'Файл' -- 2.39.5