From a486f49a3726934f99763cc6ae93a41dafc40deb Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Wed, 26 Oct 2011 11:12:38 +0200 Subject: 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 --- tests/test_xmlrpc/test_user_plugin.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tests') 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 @@ -195,6 +195,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=( -- cgit