summaryrefslogtreecommitdiffstats
path: root/tests/test_ipalib/test_cli.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-10-07 23:29:42 -0600
committerJason Gerard DeRose <jderose@redhat.com>2008-10-07 23:29:42 -0600
commit9bff91fc0871cc9aa02e1fd63776a303185f3b3c (patch)
tree883b3cc0b845d070e5ed44b8d9227c2c6a1d55cc /tests/test_ipalib/test_cli.py
parent97634e18c78677c5568e2783191f4a6bc4512105 (diff)
downloadfreeipa-9bff91fc0871cc9aa02e1fd63776a303185f3b3c.tar.gz
freeipa-9bff91fc0871cc9aa02e1fd63776a303185f3b3c.tar.xz
freeipa-9bff91fc0871cc9aa02e1fd63776a303185f3b3c.zip
PEP 257: cleaned up docstrings in test_cli.py
Diffstat (limited to 'tests/test_ipalib/test_cli.py')
-rw-r--r--tests/test_ipalib/test_cli.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/test_ipalib/test_cli.py b/tests/test_ipalib/test_cli.py
index 33e4d2207..50bfb932f 100644
--- a/tests/test_ipalib/test_cli.py
+++ b/tests/test_ipalib/test_cli.py
@@ -27,7 +27,7 @@ from ipalib import cli, plugable
def test_to_cli():
"""
- Tests the `cli.to_cli` function.
+ Test the `ipalib.cli.to_cli` function.
"""
f = cli.to_cli
assert f('initialize') == 'initialize'
@@ -36,7 +36,7 @@ def test_to_cli():
def test_from_cli():
"""
- Tests the `cli.from_cli` function.
+ Test the `ipalib.cli.from_cli` function.
"""
f = cli.from_cli
assert f('initialize') == 'initialize'
@@ -46,6 +46,7 @@ def test_from_cli():
def get_cmd_name(i):
return 'cmd_%d' % i
+
class DummyCommand(object):
def __init__(self, name):
self.__name = name
@@ -54,6 +55,7 @@ class DummyCommand(object):
return self.__name
name = property(__get_name)
+
class DummyAPI(object):
def __init__(self, cnt):
self.__cmd = plugable.NameSpace(self.__cmd_iter(cnt))
@@ -73,21 +75,21 @@ class DummyAPI(object):
pass
-
-
-
class test_CLI(ClassChecker):
"""
- Tests the `cli.CLI` class.
+ Test the `ipalib.cli.CLI` class.
"""
_cls = cli.CLI
def test_class(self):
+ """
+ Test the `ipalib.cli.CLI` class.
+ """
assert type(self.cls.api) is property
def test_api(self):
"""
- Tests the `cli.CLI.api` property.
+ Test the `ipalib.cli.CLI.api` property.
"""
api = 'the plugable.API instance'
o = self.cls(api)
@@ -95,7 +97,7 @@ class test_CLI(ClassChecker):
def dont_parse(self):
"""
- Tests the `cli.CLI.parse` method.
+ Test the `ipalib.cli.CLI.parse` method.
"""
o = self.cls(None)
args = ['hello', 'naughty', 'nurse']
@@ -111,7 +113,7 @@ class test_CLI(ClassChecker):
def test_mcl(self):
"""
- Tests the `cli.CLI.mcl` (Max Command Length) property .
+ Test the `ipalib.cli.CLI.mcl` property .
"""
cnt = 100
api = DummyAPI(cnt)
@@ -123,7 +125,7 @@ class test_CLI(ClassChecker):
def test_dict(self):
"""
- Tests the `cli.CLI.__contains__` and `cli.CLI.__getitem__` methods.
+ Test container emulation of `ipalib.cli.CLI` class.
"""
cnt = 25
api = DummyAPI(cnt)