Exemplo n.º 1
0
 def update(self):
     """ check if we are inside a Blog, if its true
         set it into self.blog
     """
     self.context = aq_inner(self.context)
     self.blog = None
     # is context a Blog or inside a Blog?
     for ob in self.context.aq_chain:
         if ISiteRoot.providedBy(ob):
             break
         if IBlog.providedBy(ob):
             self.blog = ob
             break
Exemplo n.º 2
0
 def test_factory(self):
     fti = queryUtility(IDexterityFTI, name='Blog')
     factory = fti.factory
     new_object = createObject(factory)
     self.assertTrue(IBlog.providedBy(new_object))
Exemplo n.º 3
0
 def test_adding(self):
     self.assertTrue(IBlog.providedBy(self.blog))