summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_ipalib/test_output.py1
-rw-r--r--tests/test_ipalib/test_parameters.py6
-rw-r--r--tests/test_ipalib/test_rpc.py4
-rw-r--r--tests/util.py2
4 files changed, 6 insertions, 7 deletions
diff --git a/tests/test_ipalib/test_output.py b/tests/test_ipalib/test_output.py
index ceb825c4..19d728f3 100644
--- a/tests/test_ipalib/test_output.py
+++ b/tests/test_ipalib/test_output.py
@@ -24,6 +24,7 @@ Test the `ipalib.output` module.
from tests.util import raises, ClassChecker
from ipalib import output
from ipalib.frontend import Command
+from ipalib import _
class test_Output(ClassChecker):
"""
diff --git a/tests/test_ipalib/test_parameters.py b/tests/test_ipalib/test_parameters.py
index b5a01fde..038941b8 100644
--- a/tests/test_ipalib/test_parameters.py
+++ b/tests/test_ipalib/test_parameters.py
@@ -31,7 +31,7 @@ from tests.data import binary_bytes, utf8_bytes, unicode_str
from ipalib import parameters, request, errors, config
from ipalib.constants import TYPE_ERROR, CALLABLE_ERROR, NULLS
from ipalib.errors import ValidationError
-
+from ipalib import _
class test_DefaultFrom(ClassChecker):
"""
@@ -192,9 +192,9 @@ class test_Param(ClassChecker):
assert o.flags == frozenset()
# Test that doc defaults from label:
- o = self.cls('my_param', doc='Hello world')
+ o = self.cls('my_param', doc=_('Hello world'))
assert o.label.msg == 'my_param'
- assert o.doc == 'Hello world'
+ assert o.doc.msg == 'Hello world'
o = self.cls('my_param', label='My Param')
assert o.label == 'My Param'
diff --git a/tests/test_ipalib/test_rpc.py b/tests/test_ipalib/test_rpc.py
index d5dd38cd..83092b5d 100644
--- a/tests/test_ipalib/test_rpc.py
+++ b/tests/test_ipalib/test_rpc.py
@@ -128,7 +128,7 @@ def test_xml_dumps():
# Test serializing an RPC request:
data = f(params, 'the_method')
(p, m) = loads(data)
- assert_equal(m, u'the_method')
+ assert_equal(m, 'the_method')
assert type(p) is tuple
assert rpc.xml_unwrap(p) == params
@@ -159,7 +159,7 @@ def test_xml_loads():
# Test un-serializing an RPC request:
data = dumps(wrapped, 'the_method', allow_none=True)
(p, m) = f(data)
- assert_equal(m, u'the_method')
+ assert_equal(m, 'the_method')
assert_equal(p, params)
# Test un-serializing an RPC response:
diff --git a/tests/util.py b/tests/util.py
index 4d5fea67..f3215e7d 100644
--- a/tests/util.py
+++ b/tests/util.py
@@ -31,8 +31,6 @@ import ipalib
from ipalib.plugable import Plugin
from ipalib.request import context
-
-
class TempDir(object):
def __init__(self):
self.__path = tempfile.mkdtemp(prefix='ipa.tests.')