summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-10-26 11:12:38 +0200
committerSimo Sorce <ssorce@redhat.com>2012-01-11 12:04:14 -0500
commitef6414fdb3f88b8c0b96610df4b36064fe3fcded (patch)
treec0267fc9b6c78a2b894b9f5d18f65e7df6398863 /tests
parent6dae0a1b9eeb01c47cf242cc77439b2b68aef1e3 (diff)
downloadfreeipa.git-ef6414fdb3f88b8c0b96610df4b36064fe3fcded.tar.gz
freeipa.git-ef6414fdb3f88b8c0b96610df4b36064fe3fcded.tar.xz
freeipa.git-ef6414fdb3f88b8c0b96610df4b36064fe3fcded.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')
-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 7a2489ee..8cd27396 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], {}