コード例 #1
0
 def test_factory(self):
     fti = queryUtility(
         IDexterityFTI,
         name='PressRelease'
     )
     factory = fti.factory
     new_object = createObject(factory)
     self.assertTrue(IPressRelease.providedBy(new_object))
コード例 #2
0
 def test_adding(self):
     self.portal.invokeFactory(
         'PressRelease',
         'doc1'
     )
     self.assertTrue(IPressRelease.providedBy(self.portal['doc1']))