summaryrefslogtreecommitdiffstats
path: root/ipalib/tests/test_cli.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-08-14 05:46:20 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-08-14 05:46:20 +0000
commitba8d32a110f3dc96b091df9a2520f60c99ac26ba (patch)
treeb6161b299992f0b15b572430bdf210a67c10c527 /ipalib/tests/test_cli.py
parentd95133b66f64a2e4f1c8aafa5ff9183c6acfe9a7 (diff)
downloadfreeipa.git-ba8d32a110f3dc96b091df9a2520f60c99ac26ba.tar.gz
freeipa.git-ba8d32a110f3dc96b091df9a2520f60c99ac26ba.tar.xz
freeipa.git-ba8d32a110f3dc96b091df9a2520f60c99ac26ba.zip
150: NameSpace.__iter__() now iterates through the names, not the members; added NameSpace.__call__() method which iterates through the members; NameSpace no longer requires members to be Proxy instances; updated unit tests and affected code; cleaned up NameSpace docstrings and switch to epydoc param docstrings
Diffstat (limited to 'ipalib/tests/test_cli.py')
-rw-r--r--ipalib/tests/test_cli.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ipalib/tests/test_cli.py b/ipalib/tests/test_cli.py
index ad02c645..4c14c0dd 100644
--- a/ipalib/tests/test_cli.py
+++ b/ipalib/tests/test_cli.py
@@ -22,7 +22,7 @@ Unit tests for `ipalib.cli` module.
"""
from tstutil import raises, getitem, no_set, no_del, read_only, ClassChecker
-from ipalib import cli
+from ipalib import cli, plugable
def test_to_cli():
@@ -50,7 +50,7 @@ class DummyCmd(object):
class DummyAPI(object):
def __init__(self, cnt):
- self.__cmd = tuple(self.__cmd_iter(cnt))
+ self.__cmd = plugable.NameSpace(self.__cmd_iter(cnt))
def __get_cmd(self):
return self.__cmd
@@ -123,7 +123,7 @@ class test_CLI(ClassChecker):
assert len(api.cmd) == cnt
o = self.cls(api)
o.finalize()
- for cmd in api.cmd:
+ for cmd in api.cmd():
key = cli.to_cli(cmd.name)
assert key in o
assert o[key] is cmd