summaryrefslogtreecommitdiffstats
path: root/tests/test_xmlrpc/test_delegation_plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_xmlrpc/test_delegation_plugin.py')
-rw-r--r--tests/test_xmlrpc/test_delegation_plugin.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/test_delegation_plugin.py b/tests/test_xmlrpc/test_delegation_plugin.py
index dbfa5ff75..1a9c36743 100644
--- a/tests/test_xmlrpc/test_delegation_plugin.py
+++ b/tests/test_xmlrpc/test_delegation_plugin.py
@@ -127,6 +127,20 @@ class test_delegation(Declarative):
dict(
+ desc='Retrieve %r with --raw' % delegation1,
+ command=('delegation_show', [delegation1], {'raw' : True}),
+ expected=dict(
+ value=delegation1,
+ summary=None,
+ result={
+ 'aci': u'(targetattr = "street || c || l || st || postalcode")(targetfilter = "(memberOf=cn=admins,cn=groups,cn=accounts,%s)")(version 3.0;acl "delegation:testdelegation";allow (write) groupdn = "ldap:///cn=editors,cn=groups,cn=accounts,%s";)' \
+ % (api.env.basedn, api.env.basedn)
+ },
+ ),
+ ),
+
+
+ dict(
desc='Search for %r' % delegation1,
command=('delegation_find', [delegation1], {}),
expected=dict(
@@ -163,6 +177,23 @@ class test_delegation(Declarative):
dict(
+ desc='Search for %r with --raw' % delegation1,
+ command=('delegation_find', [delegation1], {'raw' : True}),
+ expected=dict(
+ count=1,
+ truncated=False,
+ summary=u'1 delegation matched',
+ result=[
+ {
+ 'aci': u'(targetattr = "street || c || l || st || postalcode")(targetfilter = "(memberOf=cn=admins,cn=groups,cn=accounts,%s)")(version 3.0;acl "delegation:testdelegation";allow (write) groupdn = "ldap:///cn=editors,cn=groups,cn=accounts,%s";)' \
+ % (api.env.basedn, api.env.basedn),
+ },
+ ],
+ ),
+ ),
+
+
+ dict(
desc='Update %r' % delegation1,
command=(
'delegation_mod', [delegation1], dict(permissions=u'read')