コード例 #1
0
 def test_factory(self):
     fti = queryUtility(IDexterityFTI, name='ejercicios.plone4.candidato')
     factory = fti.factory
     new_object = createObject(factory)
     self.failUnless(ICandidato.providedBy(new_object))
コード例 #2
0
 def test_adding(self):
     self.folder.invokeFactory('ejercicios.plone4.candidato', 'can1')
     can1 = self.folder['can1']
     self.failUnless(ICandidato.providedBy(can1))