summaryrefslogtreecommitdiffstats
path: root/tests/test_xmlrpc/test_host_plugin.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2009-01-28 23:21:17 -0700
committerRob Crittenden <rcritten@redhat.com>2009-02-03 15:29:05 -0500
commit0211c76cd0ce614b9c7510315dbadf5336667410 (patch)
tree0dca19c3305db51bbd9eb6503e0ef2f3f4488ffb /tests/test_xmlrpc/test_host_plugin.py
parent5717c9d6689f15c46801f2d251e174fad4ce4748 (diff)
downloadfreeipa-0211c76cd0ce614b9c7510315dbadf5336667410.tar.gz
freeipa-0211c76cd0ce614b9c7510315dbadf5336667410.tar.xz
freeipa-0211c76cd0ce614b9c7510315dbadf5336667410.zip
Fixed some of the test_xmlrpc unit tests
Diffstat (limited to 'tests/test_xmlrpc/test_host_plugin.py')
-rw-r--r--tests/test_xmlrpc/test_host_plugin.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/test_xmlrpc/test_host_plugin.py b/tests/test_xmlrpc/test_host_plugin.py
index a3921ce16..35fbc4d4d 100644
--- a/tests/test_xmlrpc/test_host_plugin.py
+++ b/tests/test_xmlrpc/test_host_plugin.py
@@ -31,9 +31,9 @@ class test_Host(XMLRPC_test):
"""
Test the `f_host` plugin.
"""
- cn='ipaexample.%s' % api.env.domain
- description='Test host'
- localityname='Undisclosed location'
+ cn = api.env.host.decode('UTF-8')
+ description = u'Test host'
+ localityname = u'Undisclosed location'
kw={'cn': cn, 'description': description, 'localityname': localityname}
def test_add(self):
@@ -41,10 +41,10 @@ class test_Host(XMLRPC_test):
Test the `xmlrpc.host_add` method.
"""
res = api.Command['host_add'](**self.kw)
- assert res
- assert res.get('description','') == self.description
- assert res.get('cn','') == self.cn
- assert res.get('l','') == self.localityname
+ assert type(res) is dict
+ assert res['description'] == self.description
+ assert res['cn'] == self.cn
+ assert res['l'] == self.localityname
def test_doshow_all(self):
"""
@@ -95,7 +95,7 @@ class test_Host(XMLRPC_test):
"""
Test the `xmlrpc.host_mod` method.
"""
- newdesc='Updated host'
+ newdesc = u'Updated host'
modkw={'cn': self.cn, 'description': newdesc}
res = api.Command['host_mod'](**modkw)
assert res