mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Add fix for ipa plugins command
Fix adds count of plugins loaded to return dict Fixes https://fedorahosted.org/freeipa/ticket/6513 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
parent
66867319d9
commit
b3c41f21e5
@ -124,8 +124,9 @@ class plugins(LocalOrRemote):
|
|||||||
for plugin in self.api[namespace]():
|
for plugin in self.api[namespace]():
|
||||||
cls = type(plugin)
|
cls = type(plugin)
|
||||||
key = '{}.{}'.format(cls.__module__, cls.__name__)
|
key = '{}.{}'.format(cls.__module__, cls.__name__)
|
||||||
result.setdefault(key, []).append(namespace)
|
result.setdefault(key, []).append(namespace.decode('utf-8'))
|
||||||
|
|
||||||
return dict(
|
return dict(
|
||||||
result=result,
|
result=result,
|
||||||
|
count=len(result),
|
||||||
)
|
)
|
||||||
|
@ -51,6 +51,9 @@ class TestCLIParsing(object):
|
|||||||
def test_ping(self):
|
def test_ping(self):
|
||||||
self.check_command('ping', 'ping')
|
self.check_command('ping', 'ping')
|
||||||
|
|
||||||
|
def test_plugins(self):
|
||||||
|
self.check_command('plugins', 'plugins')
|
||||||
|
|
||||||
def test_user_show(self):
|
def test_user_show(self):
|
||||||
self.check_command('user-show admin', 'user_show', uid=u'admin')
|
self.check_command('user-show admin', 'user_show', uid=u'admin')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user