summaryrefslogtreecommitdiffstats
path: root/tests/unit/test-015-translate.py
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-07-10 06:26:46 -0400
committerThomas Bruederli <bruederli@kolabsys.com>2014-07-10 06:26:46 -0400
commit5d97d7f2da3d97930941c081c8bbba7de687863f (patch)
tree2af18265a15d147abd7c5e30fb11139be91977ec /tests/unit/test-015-translate.py
parent6b3df45c2cc13f5fcc3320404881cbff0a8f012e (diff)
downloadpykolab-5d97d7f2da3d97930941c081c8bbba7de687863f.tar.gz
Implement gettext language switch; remove en.po as this is not used
Diffstat (limited to 'tests/unit/test-015-translate.py')
-rw-r--r--tests/unit/test-015-translate.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/unit/test-015-translate.py b/tests/unit/test-015-translate.py
index 8ca9463..6819b80 100644
--- a/tests/unit/test-015-translate.py
+++ b/tests/unit/test-015-translate.py
@@ -4,9 +4,6 @@ from pykolab import translate
class TestTranslate(unittest.TestCase):
- def setUp(self):
- translate.setUserLanguage('en')
-
def test_001_default_langs(self):
self.assertTrue(len(translate.getDefaultLangs()) > 0)
@@ -16,10 +13,11 @@ class TestTranslate(unittest.TestCase):
def test_003_set_lang(self):
from pykolab.translate import _
- self.assertFalse(translate.setUserLanguage('foo_bar'))
self.assertEqual(_("Folder name"), "Folder name")
- self.assertTrue(translate.setUserLanguage('de_DE'))
- self.assertEqual(_("Folder name"), "Ordnername")
+ translate.setUserLanguage('de_DE')
+ self.assertEqual(_("Folder name"), "Ordnername", "German Translation found")
+ translate.setUserLanguage('foo_bar')
+ self.assertEqual(_("Folder name"), "Folder name", "Unkonwn language falls back to NullTranslations")
if __name__ == '__main__':
unittest.main()