summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2012-01-16 11:14:59 +0100
committerMartin Kosek <mkosek@redhat.com>2012-01-16 20:08:42 +0100
commit6642bc288174fd2f4f1215d5db49f92242714164 (patch)
treeedbc0f5011cec851247528c699c220ff2436e038 /tests
parenta351fbbda77d64faba9efe102ef93bcb88647db7 (diff)
downloadfreeipa.git-6642bc288174fd2f4f1215d5db49f92242714164.tar.gz
freeipa.git-6642bc288174fd2f4f1215d5db49f92242714164.tar.xz
freeipa.git-6642bc288174fd2f4f1215d5db49f92242714164.zip
Add missing --pkey-only option for selfservice and delegation
pkey-only functionality has to be implemented separately for these modules as they are based on crud.Search instead of standard LDAPSearch. Delegation moduled was also fixed to support new format of ACI's memberof attribute introduced in patch "Display the value of memberOf ACIs in permission plugin." https://fedorahosted.org/freeipa/ticket/2092
Diffstat (limited to 'tests')
-rw-r--r--tests/test_xmlrpc/test_delegation_plugin.py16
-rw-r--r--tests/test_xmlrpc/test_permission_plugin.py21
-rw-r--r--tests/test_xmlrpc/test_selfservice_plugin.py15
3 files changed, 52 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/test_delegation_plugin.py b/tests/test_xmlrpc/test_delegation_plugin.py
index 2131c5ad..dbfa5ff7 100644
--- a/tests/test_xmlrpc/test_delegation_plugin.py
+++ b/tests/test_xmlrpc/test_delegation_plugin.py
@@ -147,6 +147,22 @@ class test_delegation(Declarative):
dict(
+ desc='Search for %r with --pkey-only' % delegation1,
+ command=('delegation_find', [delegation1], {'pkey_only' : True}),
+ expected=dict(
+ count=1,
+ truncated=False,
+ summary=u'1 delegation matched',
+ result=[
+ {
+ 'aciname': delegation1,
+ },
+ ],
+ ),
+ ),
+
+
+ dict(
desc='Update %r' % delegation1,
command=(
'delegation_mod', [delegation1], dict(permissions=u'read')
diff --git a/tests/test_xmlrpc/test_permission_plugin.py b/tests/test_xmlrpc/test_permission_plugin.py
index b0df8009..b7192117 100644
--- a/tests/test_xmlrpc/test_permission_plugin.py
+++ b/tests/test_xmlrpc/test_permission_plugin.py
@@ -269,6 +269,27 @@ class test_permission(Declarative):
dict(
+ desc='Search for %r with --pkey-only' % permission1,
+ command=('permission_find', [permission1], {'pkey_only' : True}),
+ expected=dict(
+ count=2,
+ truncated=False,
+ summary=u'2 permissions matched',
+ result=[
+ {
+ 'dn': lambda x: DN(x) == permission1_dn,
+ 'cn': [permission1],
+ },
+ {
+ 'dn': lambda x: DN(x) == permission2_dn,
+ 'cn': [permission2],
+ },
+ ],
+ ),
+ ),
+
+
+ dict(
desc='Search for %r' % privilege1,
command=('privilege_find', [privilege1], {}),
expected=dict(
diff --git a/tests/test_xmlrpc/test_selfservice_plugin.py b/tests/test_xmlrpc/test_selfservice_plugin.py
index cb4b387d..e994bb32 100644
--- a/tests/test_xmlrpc/test_selfservice_plugin.py
+++ b/tests/test_xmlrpc/test_selfservice_plugin.py
@@ -137,6 +137,21 @@ class test_selfservice(Declarative):
),
),
+ dict(
+ desc='Search for %r with --pkey-only' % selfservice1,
+ command=('selfservice_find', [selfservice1], {'pkey_only' : True}),
+ expected=dict(
+ count=1,
+ truncated=False,
+ summary=u'1 selfservice matched',
+ result=[
+ {
+ 'aciname': selfservice1,
+ },
+ ],
+ ),
+ ),
+
dict(
desc='Update %r' % selfservice1,