diff options
Diffstat (limited to 'tests/test_xmlrpc')
-rw-r--r-- | tests/test_xmlrpc/test_automount_plugin.py | 24 | ||||
-rw-r--r-- | tests/test_xmlrpc/test_group_plugin.py | 6 | ||||
-rw-r--r-- | tests/test_xmlrpc/test_hbac_plugin.py | 2 | ||||
-rw-r--r-- | tests/test_xmlrpc/test_hbacsvcgroup_plugin.py | 4 | ||||
-rw-r--r-- | tests/test_xmlrpc/test_host_plugin.py | 4 | ||||
-rw-r--r-- | tests/test_xmlrpc/test_hostgroup_plugin.py | 4 | ||||
-rw-r--r-- | tests/test_xmlrpc/test_netgroup_plugin.py | 2 | ||||
-rw-r--r-- | tests/test_xmlrpc/test_passwd_plugin.py | 2 | ||||
-rw-r--r-- | tests/test_xmlrpc/test_permission_plugin.py | 6 | ||||
-rw-r--r-- | tests/test_xmlrpc/test_privilege_plugin.py | 2 | ||||
-rw-r--r-- | tests/test_xmlrpc/test_pwpolicy.py | 2 | ||||
-rw-r--r-- | tests/test_xmlrpc/test_role_plugin.py | 6 | ||||
-rw-r--r-- | tests/test_xmlrpc/test_service_plugin.py | 2 | ||||
-rw-r--r-- | tests/test_xmlrpc/test_sudocmd_plugin.py | 2 | ||||
-rw-r--r-- | tests/test_xmlrpc/test_sudocmdgroup_plugin.py | 6 | ||||
-rw-r--r-- | tests/test_xmlrpc/test_sudorule_plugin.py | 2 | ||||
-rw-r--r-- | tests/test_xmlrpc/test_user_plugin.py | 6 |
17 files changed, 46 insertions, 36 deletions
diff --git a/tests/test_xmlrpc/test_automount_plugin.py b/tests/test_xmlrpc/test_automount_plugin.py index e793a454a..92c695d42 100644 --- a/tests/test_xmlrpc/test_automount_plugin.py +++ b/tests/test_xmlrpc/test_automount_plugin.py @@ -147,7 +147,8 @@ class test_automount(XMLRPC_test): """ delkey_kw={'automountkey': self.keyname, 'raw': True} res = api.Command['automountkey_del'](self.locname, self.mapname, **delkey_kw)['result'] - assert res == True + assert res + assert_attr_equal(res, 'failed', '') # Verify that it is gone try: @@ -162,7 +163,8 @@ class test_automount(XMLRPC_test): Test the `xmlrpc.automountlocation_del` method. """ res = api.Command['automountlocation_del'](self.locname)['result'] - assert res == True + assert res + assert_attr_equal(res, 'failed', '') # Verify that it is gone try: @@ -227,7 +229,8 @@ class test_automount_indirect(XMLRPC_test): """ delkey_kw = {'automountkey': self.keyname} res = api.Command['automountkey_del'](self.locname, self.parentmap, **delkey_kw)['result'] - assert res == True + assert res + assert_attr_equal(res, 'failed', '') # Verify that it is gone try: @@ -242,7 +245,8 @@ class test_automount_indirect(XMLRPC_test): Remove the indirect map for auto.home. """ res = api.Command['automountmap_del'](self.locname, self.mapname)['result'] - assert res == True + assert res + assert_attr_equal(res, 'failed', '') # Verify that it is gone try: @@ -257,7 +261,8 @@ class test_automount_indirect(XMLRPC_test): Remove the location. """ res = api.Command['automountlocation_del'](self.locname)['result'] - assert res == True + assert res + assert_attr_equal(res, 'failed', '') # Verity that it is gone try: @@ -310,7 +315,8 @@ class test_automount_indirect_no_parent(XMLRPC_test): """ delkey_kw={'automountkey': self.keyname} res = api.Command['automountkey_del'](self.locname, self.parentmap, **delkey_kw)['result'] - assert res == True + assert res + assert_attr_equal(res, 'failed', '') # Verify that it is gone try: @@ -325,7 +331,8 @@ class test_automount_indirect_no_parent(XMLRPC_test): Remove the indirect map for auto.home. """ res = api.Command['automountmap_del'](self.locname, self.mapname)['result'] - assert res == True + assert res + assert_attr_equal(res, 'failed', '') # Verify that it is gone try: @@ -340,7 +347,8 @@ class test_automount_indirect_no_parent(XMLRPC_test): Remove the location. """ res = api.Command['automountlocation_del'](self.locname)['result'] - assert res == True + assert res + assert_attr_equal(res, 'failed', '') # Verity that it is gone try: diff --git a/tests/test_xmlrpc/test_group_plugin.py b/tests/test_xmlrpc/test_group_plugin.py index 56ed2e5ea..5b2584b9c 100644 --- a/tests/test_xmlrpc/test_group_plugin.py +++ b/tests/test_xmlrpc/test_group_plugin.py @@ -497,7 +497,7 @@ class test_group(Declarative): desc='Delete %r' % group1, command=('group_del', [group1], {}), expected=dict( - result=True, + result=dict(failed=u''), value=group1, summary=u'Deleted group "testgroup1"', ) @@ -532,7 +532,7 @@ class test_group(Declarative): desc='Delete %r' % group2, command=('group_del', [group2], {}), expected=dict( - result=True, + result=dict(failed=u''), value=group2, summary=u'Deleted group "testgroup2"', ) @@ -652,7 +652,7 @@ class test_group(Declarative): desc='Now delete the unmanaged group %r' % user1, command=('group_del', [user1], {}), expected=dict( - result=True, + result=dict(failed=u''), value=user1, summary=u'Deleted group "%s"' % user1, ) diff --git a/tests/test_xmlrpc/test_hbac_plugin.py b/tests/test_xmlrpc/test_hbac_plugin.py index 1d51c17ab..504565477 100644 --- a/tests/test_xmlrpc/test_hbac_plugin.py +++ b/tests/test_xmlrpc/test_hbac_plugin.py @@ -405,7 +405,7 @@ class test_hbac(XMLRPC_test): """ Test deleting a HBAC rule using `xmlrpc.hbacrule_del`. """ - assert api.Command['hbacrule_del'](self.rule_name)['result'] is True + api.Command['hbacrule_del'](self.rule_name) # verify that it's gone try: api.Command['hbacrule_show'](self.rule_name) diff --git a/tests/test_xmlrpc/test_hbacsvcgroup_plugin.py b/tests/test_xmlrpc/test_hbacsvcgroup_plugin.py index 9bd8c76e2..25b8f9fd2 100644 --- a/tests/test_xmlrpc/test_hbacsvcgroup_plugin.py +++ b/tests/test_xmlrpc/test_hbacsvcgroup_plugin.py @@ -230,7 +230,7 @@ class test_hbacsvcgroup(Declarative): expected=dict( value=hbacsvcgroup1, summary=u'Deleted HBAC Service group "testhbacsvcgroup1"', - result=True, + result=dict(failed=u''), ), ), @@ -241,7 +241,7 @@ class test_hbacsvcgroup(Declarative): expected=dict( value=hbacsvc1, summary=u'Deleted service "%s"' % hbacsvc1, - result=True, + result=dict(failed=u''), ), ) diff --git a/tests/test_xmlrpc/test_host_plugin.py b/tests/test_xmlrpc/test_host_plugin.py index 209530176..18f813d5b 100644 --- a/tests/test_xmlrpc/test_host_plugin.py +++ b/tests/test_xmlrpc/test_host_plugin.py @@ -370,7 +370,7 @@ class test_host(Declarative): expected=dict( value=fqdn1, summary=u'Deleted host "%s"' % fqdn1, - result=True, + result=dict(failed=u''), ), ), @@ -444,7 +444,7 @@ class test_host(Declarative): expected=dict( value=short1, summary=u'Deleted host "%s"' % short1, - result=True, + result=dict(failed=u''), ), ), diff --git a/tests/test_xmlrpc/test_hostgroup_plugin.py b/tests/test_xmlrpc/test_hostgroup_plugin.py index f443c8c0f..99ca9226c 100644 --- a/tests/test_xmlrpc/test_hostgroup_plugin.py +++ b/tests/test_xmlrpc/test_hostgroup_plugin.py @@ -238,7 +238,7 @@ class test_hostgroup(Declarative): expected=dict( value=hostgroup1, summary=u'Deleted hostgroup "testhostgroup1"', - result=True, + result=dict(failed=u''), ), ), @@ -249,7 +249,7 @@ class test_hostgroup(Declarative): expected=dict( value=fqdn1, summary=u'Deleted host "%s"' % fqdn1, - result=True, + result=dict(failed=u''), ), ) diff --git a/tests/test_xmlrpc/test_netgroup_plugin.py b/tests/test_xmlrpc/test_netgroup_plugin.py index b9fb8dfaf..5e73d0ed3 100644 --- a/tests/test_xmlrpc/test_netgroup_plugin.py +++ b/tests/test_xmlrpc/test_netgroup_plugin.py @@ -1057,7 +1057,7 @@ class test_netgroup(Declarative): expected=dict( value=netgroup1, summary=u'Deleted netgroup "%s"' % netgroup1, - result=True, + result=dict(failed=u''), ), ), diff --git a/tests/test_xmlrpc/test_passwd_plugin.py b/tests/test_xmlrpc/test_passwd_plugin.py index ecb4beec9..32e75acbe 100644 --- a/tests/test_xmlrpc/test_passwd_plugin.py +++ b/tests/test_xmlrpc/test_passwd_plugin.py @@ -59,7 +59,7 @@ class test_passwd(XMLRPC_test): """ Remove the test user """ - assert api.Command['user_del'](self.uid)['result'] is True + api.Command['user_del'](self.uid) # Verify that it is gone try: diff --git a/tests/test_xmlrpc/test_permission_plugin.py b/tests/test_xmlrpc/test_permission_plugin.py index 80ddb4d7b..9d066cc81 100644 --- a/tests/test_xmlrpc/test_permission_plugin.py +++ b/tests/test_xmlrpc/test_permission_plugin.py @@ -336,7 +336,7 @@ class test_permission(Declarative): desc='Delete %r' % permission1, command=('permission_del', [permission1], {}), expected=dict( - result=True, + result=dict(failed=u''), value=permission1, summary=u'Deleted permission "%s"' % permission1, ) @@ -368,7 +368,7 @@ class test_permission(Declarative): desc='Delete %r' % permission2, command=('permission_del', [permission2], {}), expected=dict( - result=True, + result=dict(failed=u''), value=permission2, summary=u'Deleted permission "%s"' % permission2, ) @@ -391,7 +391,7 @@ class test_permission(Declarative): desc='Delete %r' % privilege1, command=('privilege_del', [privilege1], {}), expected=dict( - result=True, + result=dict(failed=u''), value=privilege1, summary=u'Deleted privilege "%s"' % privilege1, ) diff --git a/tests/test_xmlrpc/test_privilege_plugin.py b/tests/test_xmlrpc/test_privilege_plugin.py index adcf86ba2..5b0bcc618 100644 --- a/tests/test_xmlrpc/test_privilege_plugin.py +++ b/tests/test_xmlrpc/test_privilege_plugin.py @@ -355,7 +355,7 @@ class test_privilege(Declarative): desc='Delete %r' % privilege1, command=('privilege_del', [privilege1], {}), expected=dict( - result=True, + result=dict(failed=u''), value=privilege1, summary=u'Deleted privilege "%s"' % privilege1, ) diff --git a/tests/test_xmlrpc/test_pwpolicy.py b/tests/test_xmlrpc/test_pwpolicy.py index 5cfc14924..3cfc311b9 100644 --- a/tests/test_xmlrpc/test_pwpolicy.py +++ b/tests/test_xmlrpc/test_pwpolicy.py @@ -164,7 +164,7 @@ class test_pwpolicy(XMLRPC_test): """ Test the `xmlrpc.pwpolicy_del` method. """ - assert api.Command['pwpolicy_del'](self.group)['result'] is True + api.Command['pwpolicy_del'](self.group) # Verify that it is gone try: api.Command['pwpolicy_show'](self.group) diff --git a/tests/test_xmlrpc/test_role_plugin.py b/tests/test_xmlrpc/test_role_plugin.py index 283da2a0e..28d1c6b43 100644 --- a/tests/test_xmlrpc/test_role_plugin.py +++ b/tests/test_xmlrpc/test_role_plugin.py @@ -411,7 +411,7 @@ class test_role(Declarative): desc='Delete %r' % group1, command=('group_del', [group1], {}), expected=dict( - result=True, + result=dict(failed=u''), value=group1, summary=u'Deleted group "testgroup1"', ) @@ -495,7 +495,7 @@ class test_role(Declarative): desc='Delete %r' % role1, command=('role_del', [role1], {}), expected=dict( - result=True, + result=dict(failed=u''), value=role1, summary=u'Deleted role "%s"' % role1, ) @@ -545,7 +545,7 @@ class test_role(Declarative): desc='Delete %r' % role2, command=('role_del', [role2], {}), expected=dict( - result=True, + result=dict(failed=u''), value=role2, summary=u'Deleted role "%s"' % role2, ) diff --git a/tests/test_xmlrpc/test_service_plugin.py b/tests/test_xmlrpc/test_service_plugin.py index 9d0936b64..a541cae12 100644 --- a/tests/test_xmlrpc/test_service_plugin.py +++ b/tests/test_xmlrpc/test_service_plugin.py @@ -280,7 +280,7 @@ class test_host(Declarative): expected=dict( value=service1, summary=u'Deleted service "%s"' % service1, - result=True, + result=dict(failed=u''), ), ), diff --git a/tests/test_xmlrpc/test_sudocmd_plugin.py b/tests/test_xmlrpc/test_sudocmd_plugin.py index 47c476f86..daf3ca650 100644 --- a/tests/test_xmlrpc/test_sudocmd_plugin.py +++ b/tests/test_xmlrpc/test_sudocmd_plugin.py @@ -163,7 +163,7 @@ class test_sudocmd(Declarative): expected=dict( value=sudocmd1, summary=u'Deleted sudo command "%s"' % sudocmd1, - result=True, + result=dict(failed=u''), ), ), diff --git a/tests/test_xmlrpc/test_sudocmdgroup_plugin.py b/tests/test_xmlrpc/test_sudocmdgroup_plugin.py index 5eb534b48..358b6dcd6 100644 --- a/tests/test_xmlrpc/test_sudocmdgroup_plugin.py +++ b/tests/test_xmlrpc/test_sudocmdgroup_plugin.py @@ -449,7 +449,7 @@ class test_sudocmdgroup(Declarative): desc='Delete %r' % sudocmdgroup1, command=('sudocmdgroup_del', [sudocmdgroup1], {}), expected=dict( - result=True, + result=dict(failed=u''), value=sudocmdgroup1, summary=u'Deleted sudo command group "testsudocmdgroup1"', ) @@ -484,7 +484,7 @@ class test_sudocmdgroup(Declarative): desc='Delete %r' % sudocmdgroup2, command=('sudocmdgroup_del', [sudocmdgroup2], {}), expected=dict( - result=True, + result=dict(failed=u''), value=sudocmdgroup2, summary=u'Deleted sudo command group "testsudocmdgroup2"', ) @@ -519,7 +519,7 @@ class test_sudocmdgroup(Declarative): desc='Now delete the sudo command %r' % sudocmd1, command=('sudocmd_del', [sudocmd1], {}), expected=dict( - result=True, + result=dict(failed=u''), value=sudocmd1, summary=u'Deleted sudo command "%s"' % sudocmd1, ) diff --git a/tests/test_xmlrpc/test_sudorule_plugin.py b/tests/test_xmlrpc/test_sudorule_plugin.py index d6c24727e..89f0af3a5 100644 --- a/tests/test_xmlrpc/test_sudorule_plugin.py +++ b/tests/test_xmlrpc/test_sudorule_plugin.py @@ -449,7 +449,7 @@ class test_sudorule(XMLRPC_test): """ Test deleting a Sudo rule using `xmlrpc.sudorule_del`. """ - assert api.Command['sudorule_del'](self.rule_name)['result'] is True + api.Command['sudorule_del'](self.rule_name) # verify that it's gone try: api.Command['sudorule_show'](self.rule_name) diff --git a/tests/test_xmlrpc/test_user_plugin.py b/tests/test_xmlrpc/test_user_plugin.py index 4754e763f..73d170af7 100644 --- a/tests/test_xmlrpc/test_user_plugin.py +++ b/tests/test_xmlrpc/test_user_plugin.py @@ -370,7 +370,7 @@ class test_user(Declarative): desc='Delete %r' % user1, command=('user_del', [user1], {}), expected=dict( - result=True, + result=dict(failed=u''), summary=u'Deleted user "tuser1"', value=user1, ), @@ -411,6 +411,7 @@ class test_user(Declarative): ), ), + dict( desc='Create %r' % user2, command=( @@ -438,11 +439,12 @@ class test_user(Declarative): ), ), + dict( desc='Delete %r and %r at the same time' % (user1, user2), command=('user_del', [user1, user2], {}), expected=dict( - result=True, + result=dict(failed=u''), summary=u'Deleted user "tuser1,tuser2"', value=u','.join((user1, user2)), ), |