Example #1
0
 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
Example #2
0
 def test_implements_IHelper(self):
     """
     TransportHelper instances should provide the IHelper interface.
     """
     self.assertTrue(IHelper.providedBy(TransportHelper(None)))
Example #3
0
 def test_implements_IHelper(self):
     """
     ApplicationHelper instances should provide the IHelper interface.
     """
     self.assertTrue(IHelper.providedBy(ApplicationHelper(None)))
Example #4
0
 def test_implements_IHelper(self):
     """
     DispatcherHelper instances should provide the IHelper interface.
     """
     self.assertTrue(IHelper.providedBy(DispatcherHelper(None)))
Example #5
0
 def test_implements_IHelper(self):
     """
     ApplicationHelper instances should provide the IHelper interface.
     """
     self.assertTrue(IHelper.providedBy(ApplicationHelper(None)))