def test_adding(self): self.portal.invokeFactory('BlogEntry', 'BlogEntry') self.assertTrue( IBlogEntry.providedBy(self.portal['BlogEntry']) )
def test_factory(self): fti = queryUtility(IDexterityFTI, name='BlogEntry') factory = fti.factory obj = createObject(factory) self.assertTrue(IBlogEntry.providedBy(obj))