def __init__(self, context): self.context = context if IVideoEnabled.providedBy(self.context): self.fieldname = 'video_file' self.field = IVideo[self.fieldname] else: self.fieldname = 'audio_file' self.field = IAudio[self.fieldname]
def test_adding(self): self.create('video1') self.assertTrue(IVideoEnabled.providedBy(self.portal['video1']))
def test_factory(self): fti = self.getFti() factory = fti.factory new_object = createObject(factory) self.assertTrue(IVideoEnabled.providedBy(new_object))