From 97b01a48914fbed96b73fe8532bad3b4bd08027e Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Tue, 9 Sep 2008 21:18:44 +0000 Subject: 273: Added Command.get_args() method; added corresponding unit tests --- ipalib/tests/test_public.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ipalib/tests') diff --git a/ipalib/tests/test_public.py b/ipalib/tests/test_public.py index 6cdfc5af..f9ff3a89 100644 --- a/ipalib/tests/test_public.py +++ b/ipalib/tests/test_public.py @@ -357,6 +357,17 @@ class test_Command(ClassChecker): assert self.cls.__bases__ == (plugable.Plugin,) assert self.cls.options == tuple() + def test_get_args(self): + """ + Tests the `public.Command.get_args` method. + """ + assert list(self.cls().get_args()) == [] + args = ('login', 'stuff') + class example(self.cls): + takes_args = args + o = example() + assert o.get_args() is args + def test_get_options(self): """ Tests the `public.Command.get_options` method. -- cgit