summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPavel Zuna <pzuna@redhat.com>2011-02-23 16:40:17 -0500
committerRob Crittenden <rcritten@redhat.com>2011-03-01 10:31:43 -0500
commit1eb3033311da1015ab841fa1e2615edb9eed5bdd (patch)
treef91005960ac3a5bd524f97e8dea127ec6e96a321 /tests
parentfc842e36504d39221fbfdafbaf8996b63e20de57 (diff)
downloadfreeipa-1eb3033311da1015ab841fa1e2615edb9eed5bdd.tar.gz
freeipa-1eb3033311da1015ab841fa1e2615edb9eed5bdd.tar.xz
freeipa-1eb3033311da1015ab841fa1e2615edb9eed5bdd.zip
Final i18n unit test fixes.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_ipalib/test_text.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_ipalib/test_text.py b/tests/test_ipalib/test_text.py
index 67fd0172a..1931ca4fe 100644
--- a/tests/test_ipalib/test_text.py
+++ b/tests/test_ipalib/test_text.py
@@ -21,8 +21,10 @@
Test the `ipalib.text` module.
"""
+import os
import re
import nose
+import locale
from tests.util import raises, assert_equal
from ipalib.request import context
from ipalib import request
@@ -75,12 +77,8 @@ def test_gettext():
localedir='install/po/test_locale'
test_file='install/po/test.po'
- # The test installs the test message catalog under the en_US
- # (e.g. U.S. English) language. It would be nice to use a dummy
- # language not associated with any real language, but the
- # setlocale function demands the locale be a valid known locale,
- # U.S. English is a reasonable choice.
- # request.set_languages('en_US.UTF-8')
+ lang = os.environ['LANG']
+ os.environ['LANG'] = 'xh_ZA'
# Tell gettext that our domain is 'ipa', that locale_dir is
# 'test_locale' (i.e. where to look for the message catalog)
@@ -117,6 +115,8 @@ def test_gettext():
# Reset the language and assure we don't get the test values
context.__dict__.clear()
+ os.environ['LANG'] = lang
+
translated = unicode(localized)
assert(translated[0] != prefix)