mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
115: CLI now parses out kw args; cmd.__call__() now uses print_n_call() to give feedback on the calling
This commit is contained in:
@@ -53,3 +53,15 @@ class test_CLI(ClassChecker):
|
||||
api = 'the plugable.API instance'
|
||||
o = self.cls(api)
|
||||
assert read_only(o, 'api') is api
|
||||
|
||||
def test_parse_kw(self):
|
||||
"""
|
||||
Tests the `parse_kw` method.
|
||||
"""
|
||||
o = self.cls(None)
|
||||
kw = dict(
|
||||
hello='world',
|
||||
how_are='you',
|
||||
)
|
||||
args = tuple('--%s=%s' % (cli.to_cli(k), v) for (k,v) in kw.items())
|
||||
assert dict(o.parse_kw(args)) == kw
|
||||
|
||||
Reference in New Issue
Block a user