diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-08-12 16:49:23 +0000 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-08-12 16:49:23 +0000 |
commit | 99d7638ff5c5cddb4f23d25ad13ef122476d5679 (patch) | |
tree | 0a20bd09ae0512cb8b61dcc840d851ccd35d5b05 /ipalib/tests/test_cli.py | |
parent | bc4b26ffca7b48db70006c99ddb6084542b1df88 (diff) | |
download | freeipa.git-99d7638ff5c5cddb4f23d25ad13ef122476d5679.tar.gz freeipa.git-99d7638ff5c5cddb4f23d25ad13ef122476d5679.tar.xz freeipa.git-99d7638ff5c5cddb4f23d25ad13ef122476d5679.zip |
115: CLI now parses out kw args; cmd.__call__() now uses print_n_call() to give feedback on the calling
Diffstat (limited to 'ipalib/tests/test_cli.py')
-rw-r--r-- | ipalib/tests/test_cli.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ipalib/tests/test_cli.py b/ipalib/tests/test_cli.py index b47aff3a..d56a4b19 100644 --- a/ipalib/tests/test_cli.py +++ b/ipalib/tests/test_cli.py @@ -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 |