summaryrefslogtreecommitdiffstats
path: root/ipalib/tests
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-09-19 00:00:54 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-09-19 00:00:54 +0000
commit1ec4f379f5eb0b77e6ca90c777e2e976c28ddfca (patch)
treec07cc9e9c87380e8903f9e27ac1eb0d3aeebd656 /ipalib/tests
parentf29c827d06cb455709d3b07baf727913381709ca (diff)
downloadfreeipa-1ec4f379f5eb0b77e6ca90c777e2e976c28ddfca.tar.gz
freeipa-1ec4f379f5eb0b77e6ca90c777e2e976c28ddfca.tar.xz
freeipa-1ec4f379f5eb0b77e6ca90c777e2e976c28ddfca.zip
302: Removed depreciated Command.group_args() method
Diffstat (limited to 'ipalib/tests')
-rw-r--r--ipalib/tests/test_public.py36
1 files changed, 2 insertions, 34 deletions
diff --git a/ipalib/tests/test_public.py b/ipalib/tests/test_public.py
index 939d59e8e..f45d1abea 100644
--- a/ipalib/tests/test_public.py
+++ b/ipalib/tests/test_public.py
@@ -565,44 +565,11 @@ class test_Command(ClassChecker):
"""
assert 'execute' in self.cls.__public__ # Public
- def test_group_args(self):
- o = self.get_instance(args=('one', 'two?'))
- assert o.group_args(1) == (1, None)
- assert o.group_args(1, 2) == (1, 2)
-
- o = self.get_instance(args=('one', 'two*'))
- assert o.group_args(1) == (1, None)
- assert o.group_args(1, 2) == (1, (2,))
- assert o.group_args(1, 2, 3) == (1, (2, 3))
-
- o = self.get_instance(args=('one', 'two+'))
- assert o.group_args(1, 2) == (1, (2,))
- assert o.group_args(1, 2, 3) == (1, (2, 3))
-
- o = self.get_instance()
- e = raises(errors.ArgumentError, o.group_args, 1)
- assert str(e) == 'example takes no arguments'
-
- o = self.get_instance(args=('one?',))
- e = raises(errors.ArgumentError, o.group_args, 1, 2)
- assert str(e) == 'example takes at most 1 argument'
-
- o = self.get_instance(args=('one', 'two?'))
- e = raises(errors.ArgumentError, o.group_args, 1, 2, 3)
- assert str(e) == 'example takes at most 2 arguments'
-
- o = self.get_instance(args=('one', 'two?'))
- e = raises(errors.ArgumentError, o.group_args)
- assert str(e) == 'example takes at least 1 argument'
-
- o = self.get_instance(args=('one', 'two', 'three?'))
- e = raises(errors.ArgumentError, o.group_args, 1)
- assert str(e) == 'example takes at least 2 arguments'
-
def test_args_to_kw(self):
"""
Test the `public.Command.args_to_kw` method.
"""
+ assert 'args_to_kw' in self.cls.__public__ # Public
o = self.get_instance(args=('one', 'two?'))
assert o.args_to_kw(1) == dict(one=1)
assert o.args_to_kw(1, 2) == dict(one=1, two=2)
@@ -633,6 +600,7 @@ class test_Command(ClassChecker):
"""
Tests the `public.Command.kw_to_args` method.
"""
+ assert 'kw_to_args' in self.cls.__public__ # Public
o = self.get_instance(args=('one', 'two?'))
assert o.kw_to_args() == (None, None)
assert o.kw_to_args(whatever='hello') == (None, None)