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
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
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))
def test_factory(self): fti = queryUtility(IDexterityFTI, name='collective.cover.content') factory = fti.factory new_object = createObject(factory) self.assertTrue(ICover.providedBy(new_object))