mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Base Command.execute() method now raises NotImplementedError; updated unit tests
This commit is contained in:
parent
b7fe92f44f
commit
887016e69d
@ -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):
|
||||
"""
|
||||
|
@ -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):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user