Esempio n. 1
0
 def available(self):
     """ Exibiremos ou nao este viewlet
     """
     context = self.canonical_object
     self.destaques = getattr(self.portal, FEATURES_ID, None) if (
         context == self.portal) else None
     if self.destaques:
         return ICover.providedBy(self.destaques)
     else:
         return False
Esempio n. 2
0
 def available(self):
     """ Exibiremos ou nao este viewlet
     """
     context = self.canonical_object
     self.destaques = getattr(self.portal, FEATURES_ID,
                              None) if (context == self.portal) else None
     if self.destaques:
         return ICover.providedBy(self.destaques)
     else:
         return False
Esempio n. 3
0
 def test_factory(self):
     fti = queryUtility(
         IDexterityFTI, name='collective.cover.content')
     factory = fti.factory
     new_object = createObject(factory)
     self.assertTrue(ICover.providedBy(new_object))
Esempio n. 4
0
 def test_adding(self):
     self.assertTrue(ICover.providedBy(self.c1))
 def test_factory(self):
     fti = queryUtility(IDexterityFTI, name='collective.cover.content')
     factory = fti.factory
     new_object = createObject(factory)
     self.assertTrue(ICover.providedBy(new_object))
 def test_adding(self):
     self.assertTrue(ICover.providedBy(self.c1))