def getBoard(self): """Returns containing or nearest board.""" # Try containment stoptypes = ['Plone Site'] for obj in aq_chain(aq_inner(self)): if hasattr(obj, 'portal_type') and obj.portal_type not in stoptypes: if IPloneboard.providedBy(obj): return obj return None
def testInterfaceConformance(self): self.failUnless(IPloneboard.providedBy(self.board)) self.failUnless(verifyObject(IPloneboard, self.board))