コード例 #1
0
 def test_factory(self):
     fti = queryUtility(IDexterityFTI, name='example.conference.presenter')
     factory = fti.factory
     new_object = createObject(factory)
     self.failUnless(IPresenter.providedBy(new_object))
コード例 #2
0
 def test_adding(self):
     self.folder.invokeFactory('example.conference.presenter', 'presenter1')
     p1 = self.folder['presenter1']
     self.failUnless(IPresenter.providedBy(p1))