summaryrefslogtreecommitdiffstats
path: root/tests/test_xmlrpc/test_passwd_plugin.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2009-12-09 09:09:53 -0700
committerJason Gerard DeRose <jderose@redhat.com>2009-12-10 08:29:15 -0700
commitb6e4972e7f6aa08e0392a2cf441b60ab0e7d88b7 (patch)
tree7e5329a51af169ce34a7d275a1bbd63c1e31c026 /tests/test_xmlrpc/test_passwd_plugin.py
parentd08b8858ddc3bf6265f6ea8acae6661b9fff5112 (diff)
downloadfreeipa-b6e4972e7f6aa08e0392a2cf441b60ab0e7d88b7.tar.gz
freeipa-b6e4972e7f6aa08e0392a2cf441b60ab0e7d88b7.tar.xz
freeipa-b6e4972e7f6aa08e0392a2cf441b60ab0e7d88b7.zip
Take 2: Extensible return values and validation; steps toward a single output_for_cli(); enable more webUI stuff
Diffstat (limited to 'tests/test_xmlrpc/test_passwd_plugin.py')
-rw-r--r--tests/test_xmlrpc/test_passwd_plugin.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/tests/test_xmlrpc/test_passwd_plugin.py b/tests/test_xmlrpc/test_passwd_plugin.py
index 21fb743f9..c14fa53df 100644
--- a/tests/test_xmlrpc/test_passwd_plugin.py
+++ b/tests/test_xmlrpc/test_passwd_plugin.py
@@ -41,27 +41,25 @@ class test_passwd(XMLRPC_test):
"""
Create a test user
"""
- (dn, res) = api.Command['user_add'](**self.kw)
- assert res
- assert_attr_equal(res, 'givenname', self.givenname)
- assert_attr_equal(res, 'sn', self.sn)
- assert_attr_equal(res, 'uid', self.uid)
- assert_attr_equal(res, 'homedirectory', self.home)
- assert_attr_equal(res, 'objectclass', 'ipaobject')
+ entry = api.Command['user_add'](**self.kw)['result']
+ assert_attr_equal(entry, 'givenname', self.givenname)
+ assert_attr_equal(entry, 'sn', self.sn)
+ assert_attr_equal(entry, 'uid', self.uid)
+ assert_attr_equal(entry, 'homedirectory', self.home)
+ assert_attr_equal(entry, 'objectclass', 'ipaobject')
def test_2_set_passwd(self):
"""
Test the `xmlrpc.passwd` method.
"""
- res = api.Command['passwd'](self.uid, password=u'password1')
- assert res
+ out = api.Command['passwd'](self.uid, password=u'password1')
+ assert out['result'] is True
def test_3_user_del(self):
"""
Remove the test user
"""
- res = api.Command['user_del'](self.uid)
- assert res == True
+ assert api.Command['user_del'](self.uid)['result'] is True
# Verify that it is gone
try: