Exemple #1
0
 def test_factory(self):
     fti = queryUtility(IDexterityFTI, name='sg.questions.question')
     factory = fti.factory
     new_object = createObject(factory)
     self.failUnless(IQuestion.providedBy(new_object))
Exemple #2
0
 def test_adding(self):
     self.folder.invokeFactory('sg.questions.question', 'question1')
     question1 = self.folder['question1']
     self.failUnless(IQuestion.providedBy(question1))