Base Command.execute() method now raises NotImplementedError; updated unit tests

This commit is contained in:
Jason Gerard DeRose 2008-10-08 18:18:13 -06:00
parent b7fe92f44f
commit 887016e69d
2 changed files with 4 additions and 3 deletions

View File

@ -656,9 +656,7 @@ class Command(plugable.Plugin):
... return self.api.Backend.ldap.add(**kw)
...
"""
print '%s.execute():' % self.name
print ' args =', args
print ' kw =', kw
raise NotImplementedError('%s.execute()' % self.name)
def forward(self, *args, **kw):
"""

View File

@ -685,6 +685,9 @@ class test_Command(ClassChecker):
Test the `ipalib.frontend.Command.execute` method.
"""
assert 'execute' in self.cls.__public__ # Public
o = self.cls()
e = raises(NotImplementedError, o.execute)
assert str(e) == 'Command.execute()'
def test_args_to_kw(self):
"""