From ba8d32a110f3dc96b091df9a2520f60c99ac26ba Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Thu, 14 Aug 2008 05:46:20 +0000 Subject: 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 --- ipalib/tests/test_cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ipalib/tests/test_cli.py') 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 -- cgit