expected_methods = self._get_public_methods(interface)
implemented_methods = self._get_public_methods(self.plugin.__class__)
missing_methods = set(expected_methods) - set(implemented_methods)
- return len(missing_methods) == 0
+ return not missing_methods
def _get_public_methods(self, klass):
return filter(lambda name: not(name.startswith("_")),
class ExtensionExpectingPluginInterface(StubExtension):
+ """
+ This extension expects plugin to implement all the methods defined
+ in PluginInterface
+ """
def get_plugin_interface(self):
return PluginInterface
def test_invalid_extensions_are_not_registered(self):
class InvalidExtension(object):
+ """
+ This Extension doesn't implement extension methods :
+ get_name, get_description, get_namespace and get_updated
+ """
def get_alias(self):
return "invalid_extension"