summaryrefslogtreecommitdiffstats
path: root/ipalib/tests/test_cli.py
diff options
context:
space:
mode:
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