summaryrefslogtreecommitdiffstats
path: root/tests/test_ipalib
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2009-01-03 22:03:37 -0700
committerJason Gerard DeRose <jderose@redhat.com>2009-01-03 22:03:37 -0700
commitc081ce5460018634fb30249ead2168ebf3a79044 (patch)
tree79f6de9b1a9c96863e71165b68bfda4d32334185 /tests/test_ipalib
parent912ab9e68b6030d4d115d3683893477abb4f6451 (diff)
downloadfreeipa-c081ce5460018634fb30249ead2168ebf3a79044.tar.gz
freeipa-c081ce5460018634fb30249ead2168ebf3a79044.tar.xz
freeipa-c081ce5460018634fb30249ead2168ebf3a79044.zip
request.create_translation() now sets context.ugettext and context.ungettext
Diffstat (limited to 'tests/test_ipalib')
-rw-r--r--tests/test_ipalib/test_request.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/test_ipalib/test_request.py b/tests/test_ipalib/test_request.py
index 5efc0abdb..7096b9274 100644
--- a/tests/test_ipalib/test_request.py
+++ b/tests/test_ipalib/test_request.py
@@ -65,9 +65,9 @@ def test_create_translation():
c = request.context
t = TempDir()
- # Test that StandardError is raised if gettext or ngettext:
- assert not (hasattr(c, 'gettext') or hasattr(c, 'ngettext'))
- for name in 'gettext', 'ngettext':
+ # Test that StandardError is raised if ugettext or ungettext:
+ assert not (hasattr(c, 'ugettext') or hasattr(c, 'ungettext'))
+ for name in ('ugettext', 'ungettext'):
setattr(c, name, None)
e = raises(StandardError, f, 'ipa', None)
assert str(e) == (
@@ -77,23 +77,23 @@ def test_create_translation():
delattr(c, name)
# Test using default language:
- assert not hasattr(c, 'gettext')
- assert not hasattr(c, 'ngettext')
+ assert not hasattr(c, 'ugettext')
+ assert not hasattr(c, 'ungettext')
assert not hasattr(c, 'languages')
f('ipa', t.path)
- assert hasattr(c, 'gettext')
- assert hasattr(c, 'ngettext')
+ assert hasattr(c, 'ugettext')
+ assert hasattr(c, 'ungettext')
assert c.languages == locale.getdefaultlocale()[:1]
- del c.gettext
- del c.ngettext
+ del c.ugettext
+ del c.ungettext
del c.languages
# Test using explicit languages:
langs = ('de', 'es')
f('ipa', t.path, *langs)
- assert hasattr(c, 'gettext')
- assert hasattr(c, 'ngettext')
+ assert hasattr(c, 'ugettext')
+ assert hasattr(c, 'ungettext')
assert c.languages == langs
- del c.gettext
- del c.ngettext
+ del c.ugettext
+ del c.ungettext
del c.languages