summaryrefslogtreecommitdiffstats
path: root/ipalib/tests/test_cli.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-08-12 16:49:23 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-08-12 16:49:23 +0000
commit99d7638ff5c5cddb4f23d25ad13ef122476d5679 (patch)
tree0a20bd09ae0512cb8b61dcc840d851ccd35d5b05 /ipalib/tests/test_cli.py
parentbc4b26ffca7b48db70006c99ddb6084542b1df88 (diff)
downloadfreeipa.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.py12
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