def add_helper(self, helper_object, *args, **kw): if not IHelper.providedBy(helper_object): raise ValueError( "Helper object does not provide the IHelper interface: %s" % ( helper_object,)) self.add_cleanup(helper_object.cleanup) helper_object.setup(*args, **kw) return helper_object
def test_implements_IHelper(self): """ TransportHelper instances should provide the IHelper interface. """ self.assertTrue(IHelper.providedBy(TransportHelper(None)))
def test_implements_IHelper(self): """ ApplicationHelper instances should provide the IHelper interface. """ self.assertTrue(IHelper.providedBy(ApplicationHelper(None)))
def test_implements_IHelper(self): """ DispatcherHelper instances should provide the IHelper interface. """ self.assertTrue(IHelper.providedBy(DispatcherHelper(None)))