summaryrefslogtreecommitdiffstats
path: root/tests/test_xmlrpc/test_hostgroup_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_hostgroup_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_hostgroup_plugin.py')
-rw-r--r--tests/test_xmlrpc/test_hostgroup_plugin.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_xmlrpc/test_hostgroup_plugin.py b/tests/test_xmlrpc/test_hostgroup_plugin.py
index ba6c255e0..54e978c8e 100644
--- a/tests/test_xmlrpc/test_hostgroup_plugin.py
+++ b/tests/test_xmlrpc/test_hostgroup_plugin.py
@@ -31,13 +31,13 @@ class test_Host(XMLRPC_test):
"""
Test the `f_hostgroup` plugin.
"""
- cn='testgroup'
- description='Test host group'
+ cn=u'testgroup'
+ description=u'Test host group'
kw={'cn': cn, 'description': description}
- host_cn='ipaexample.%s' % api.env.domain
- host_description='Test host'
- host_localityname='Undisclosed location'
+ host_cn = api.env.host.decode('UTF-8')
+ host_description = u'Test host'
+ host_localityname = u'Undisclosed location'
def test_add(self):
"""
@@ -83,7 +83,7 @@ class test_Host(XMLRPC_test):
"""
res = api.Command['hostgroup_find'](self.cn)
assert res
- assert len(res) == 2
+ assert len(res) == 2, res
assert res[1].get('description','') == self.description
assert res[1].get('cn','') == self.cn
assert res[1].get('member','').startswith('cn=%s' % self.host_cn)
@@ -92,7 +92,7 @@ class test_Host(XMLRPC_test):
"""
Test the `xmlrpc.hostgroup_mod` method.
"""
- newdesc='Updated host group'
+ newdesc=u'Updated host group'
modkw={'cn': self.cn, 'description': newdesc}
res = api.Command['hostgroup_mod'](**modkw)
assert res