diff options
author | Martin Kosek <mkosek@redhat.com> | 2012-12-19 15:38:52 +0100 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-12-19 16:32:31 +0100 |
commit | 8183e2c94b7732f2e19cd257489609d0863c2124 (patch) | |
tree | 5723a6701df5c563a7aa1271ad0a28c1cd09ec1e /tests/test_xmlrpc | |
parent | ece9ac8e1b421f3e05d39545155a86f9446ff827 (diff) | |
download | freeipa.git-8183e2c94b7732f2e19cd257489609d0863c2124.tar.gz freeipa.git-8183e2c94b7732f2e19cd257489609d0863c2124.tar.xz freeipa.git-8183e2c94b7732f2e19cd257489609d0863c2124.zip |
Fix delegation-find command --group handling
A wrong way of handling --group DN object caused Internal Error
for this command. Fix that and also provide unit tests to avoid
another regression.
https://fedorahosted.org/freeipa/ticket/3311
Diffstat (limited to 'tests/test_xmlrpc')
-rw-r--r-- | tests/test_xmlrpc/test_delegation_plugin.py | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/test_delegation_plugin.py b/tests/test_xmlrpc/test_delegation_plugin.py index a31fed3e..bc3b96a2 100644 --- a/tests/test_xmlrpc/test_delegation_plugin.py +++ b/tests/test_xmlrpc/test_delegation_plugin.py @@ -178,6 +178,46 @@ class test_delegation(Declarative): dict( + desc='Search for %r using --group filter' % delegation1, + command=('delegation_find', [delegation1], {'group': u'editors'}), + expected=dict( + count=1, + truncated=False, + summary=u'1 delegation matched', + result=[ + { + 'attrs': [u'street', u'c', u'l', u'st', u'postalcode'], + 'permissions': [u'write'], + 'aciname': delegation1, + 'group': u'editors', + 'memberof': member1, + }, + ], + ), + ), + + + dict( + desc='Search for %r using --membergroup filter' % delegation1, + command=('delegation_find', [delegation1], {'memberof': member1}), + expected=dict( + count=1, + truncated=False, + summary=u'1 delegation matched', + result=[ + { + 'attrs': [u'street', u'c', u'l', u'st', u'postalcode'], + 'permissions': [u'write'], + 'aciname': delegation1, + 'group': u'editors', + 'memberof': member1, + }, + ], + ), + ), + + + dict( desc='Search for %r with --pkey-only' % delegation1, command=('delegation_find', [delegation1], {'pkey_only' : True}), expected=dict( |