summaryrefslogtreecommitdiffstats
path: root/ipatests/test_xmlrpc/test_sudorule_plugin.py
diff options
context:
space:
mode:
authorTomas Babej <tbabej@redhat.com>2014-06-16 16:51:31 +0200
committerMartin Kosek <mkosek@redhat.com>2014-06-18 12:59:25 +0200
commit637ef11109600d87bfb783eadd4b6401fa58d468 (patch)
tree1e2d013dd51e5178f2a11edca7aff6fccfe77e91 /ipatests/test_xmlrpc/test_sudorule_plugin.py
parentd868fc5566da547d2060ef4a42eb5a0d0e0a72d6 (diff)
downloadfreeipa-637ef11109600d87bfb783eadd4b6401fa58d468.tar.gz
freeipa-637ef11109600d87bfb783eadd4b6401fa58d468.tar.xz
freeipa-637ef11109600d87bfb783eadd4b6401fa58d468.zip
sudorule: Allow unsetting sudoorder
After setting sudoorder, you are unable to unset it, since the check for uniqueness of order of sudorules is applied incorrectly. Fix the behaviour and cover it in the test suite. https://fedorahosted.org/freeipa/ticket/4360 Reviewed-By: Martin Kosek <mkosek@redhat.com>
Diffstat (limited to 'ipatests/test_xmlrpc/test_sudorule_plugin.py')
-rw-r--r--ipatests/test_xmlrpc/test_sudorule_plugin.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ipatests/test_xmlrpc/test_sudorule_plugin.py b/ipatests/test_xmlrpc/test_sudorule_plugin.py
index 7dc3cb1e4..052578666 100644
--- a/ipatests/test_xmlrpc/test_sudorule_plugin.py
+++ b/ipatests/test_xmlrpc/test_sudorule_plugin.py
@@ -769,6 +769,10 @@ class test_sudorule(XMLRPC_test):
with assert_raises(errors.ValidationError):
api.Command['sudorule_mod'](self.rule_name, sudoorder=0)
+ # Try unsetting sudoorder from both rules
+ api.Command['sudorule_mod'](self.rule_name, sudoorder=None)
+ api.Command['sudorule_mod'](self.rule_name2, sudoorder=None)
+
def test_m_sudorule_del(self):
"""