whoami.py: Type error when running tests

While test run the TypeError occured in whoami.validate_output().
There should be 'tuple' type in output too.

Fixes: https://pagure.io/freeipa/issue/7050
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Tibor Dudlák
2017-06-28 17:07:57 +02:00
committed by Pavel Vomacka
parent e2e380e83b
commit 17f03a7952
2 changed files with 3 additions and 2 deletions

View File

@@ -6477,7 +6477,7 @@ output: PrimaryKey('value')
command: whoami/1
args: 0,1,3
option: Str('version?')
output: Output('arguments', type=[<type 'list'>])
output: Output('arguments', type=[<type 'list'>, <type 'tuple'>])
output: Output('command', type=[<type 'unicode'>])
output: Output('object', type=[<type 'unicode'>])
default: aci/1

View File

@@ -87,7 +87,8 @@ class whoami(Command):
has_output = (
output.Output('object', unicode, _('Object class name')),
output.Output('command', unicode, _('Function to get details')),
output.Output('arguments', list, _('Arguments to details function')),
output.Output('arguments', (list, tuple),
_('Arguments to details function')),
)
def execute(self, **options):