summaryrefslogtreecommitdiffstats
path: root/tests/test_xmlrpc/test_selfservice_plugin.py
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2012-01-06 12:44:59 +0100
committerMartin Kosek <mkosek@redhat.com>2012-01-24 16:52:41 +0100
commitef68c02c6acdba29de9d4bab2c7f5aa956b55da2 (patch)
tree29220600aada7d0303907d1b3378ebd020dbd8b0 /tests/test_xmlrpc/test_selfservice_plugin.py
parent6141919fba30487e3c4eb19b0c87a10384fd9d20 (diff)
downloadfreeipa-ef68c02c6acdba29de9d4bab2c7f5aa956b55da2.tar.gz
freeipa-ef68c02c6acdba29de9d4bab2c7f5aa956b55da2.tar.xz
freeipa-ef68c02c6acdba29de9d4bab2c7f5aa956b55da2.zip
Fix selfservice-find crashes
Ignore empty options when performing an ACI search so that the find command does not crash. Update ipa(1) man page to mention this common behavior of find commands. https://fedorahosted.org/freeipa/ticket/2011 https://fedorahosted.org/freeipa/ticket/2012
Diffstat (limited to 'tests/test_xmlrpc/test_selfservice_plugin.py')
-rw-r--r--tests/test_xmlrpc/test_selfservice_plugin.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/test_selfservice_plugin.py b/tests/test_xmlrpc/test_selfservice_plugin.py
index e994bb32c..670e353d8 100644
--- a/tests/test_xmlrpc/test_selfservice_plugin.py
+++ b/tests/test_xmlrpc/test_selfservice_plugin.py
@@ -154,6 +154,25 @@ class test_selfservice(Declarative):
dict(
+ desc='Search for %r with empty attrs and permissions' % selfservice1,
+ command=('selfservice_find', [selfservice1], {'attrs' : None, 'permissions' : None}),
+ expected=dict(
+ count=1,
+ truncated=False,
+ summary=u'1 selfservice matched',
+ result=[
+ {
+ 'attrs': [u'street', u'c', u'l', u'st', u'postalcode'],
+ 'permissions': [u'write'],
+ 'selfaci': True,
+ 'aciname': selfservice1,
+ },
+ ],
+ ),
+ ),
+
+
+ dict(
desc='Update %r' % selfservice1,
command=(
'selfservice_mod', [selfservice1], dict(permissions=u'read')