Exemple #1
0
 def getExtropyParentChain(self, include_self=False):
     """Gets the containg parent chain."""
     chain = []
     for o in self.aq_chain:
         if not include_self and o is self:
             continue
         if IExtropyBase.providedBy(o):
             chain.append(o)
     return chain
Exemple #2
0
 def getExtropyParent(self, metatype=None):
     """Gets the containg parent, if it is an ExtropyBase object."""
     for o in self.aq_chain:
         if o is not self:
             if IExtropyBase.providedBy(o):
                 if metatype is None:
                     return o
                 elif hasattr(o,'meta_type') and metatype == o.meta_type:
                     return o
     return None
Exemple #3
0
 def testProjectInterface(self):
     from Products.Extropy.interfaces import IExtropyBase
     self.failUnless(IExtropyBase.providedBy(self.project))
     from Products.Extropy.interfaces import IExtropyTracking
     self.failUnless(IExtropyTracking.providedBy(self.project))