summaryrefslogtreecommitdiffstats
path: root/tests/test_xmlrpc/test_user_plugin.py
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-10-26 11:12:38 +0200
committerEndi S. Dewata <edewata@redhat.com>2011-10-27 14:17:51 +0000
commita486f49a3726934f99763cc6ae93a41dafc40deb (patch)
tree23063e2a18b0fa2ff0a6aeafaee22d642cb759f6 /tests/test_xmlrpc/test_user_plugin.py
parent52981883aba2a2ce7a0152c50ad94201f327f411 (diff)
downloadfreeipa-a486f49a3726934f99763cc6ae93a41dafc40deb.tar.gz
freeipa-a486f49a3726934f99763cc6ae93a41dafc40deb.tar.xz
freeipa-a486f49a3726934f99763cc6ae93a41dafc40deb.zip
Create pkey-only option for find commands
New option --pkey-only is available for all LDAPSearch based classes with primary key visible in the output. This option makes LDAPSearch commands search for primary attribute only. This may be useful when manipulating large data sets. User can at first retrieve all primary keys in a relatively small data package and then run further commands with retrieved primary keys. https://fedorahosted.org/freeipa/ticket/1262
Diffstat (limited to 'tests/test_xmlrpc/test_user_plugin.py')
-rw-r--r--tests/test_xmlrpc/test_user_plugin.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/test_user_plugin.py b/tests/test_xmlrpc/test_user_plugin.py
index 7a2489ee8..8cd273960 100644
--- a/tests/test_xmlrpc/test_user_plugin.py
+++ b/tests/test_xmlrpc/test_user_plugin.py
@@ -196,6 +196,26 @@ class test_user(Declarative):
dict(
+ desc='Search for %r with pkey-only=True' % user1,
+ command=(
+ 'user_find', [user1], {'pkey_only': True}
+ ),
+ expected=dict(
+ result=[
+ {
+ 'dn':lambda x: DN(x) == \
+ DN(('uid',user1),('cn','users'),
+ ('cn','accounts'),api.env.basedn),
+ 'uid': [user1],
+ },
+ ],
+ summary=u'1 user matched',
+ count=1, truncated=False,
+ ),
+ ),
+
+
+ dict(
desc='Search for %r with minimal attributes' % user1,
command=(
'user_find', [user1], {}