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