mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-09-03 20:52:56 -05:00
Base Command.execute() method now raises NotImplementedError; updated unit tests
This commit is contained in:
+1
-3
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user