예제 #1
0
 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]
예제 #2
0
 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]
예제 #3
0
 def test_adding(self):
     self.create('video1')
     self.assertTrue(IVideoEnabled.providedBy(self.portal['video1']))
예제 #4
0
 def test_factory(self):
     fti = self.getFti()
     factory = fti.factory
     new_object = createObject(factory)
     self.assertTrue(IVideoEnabled.providedBy(new_object))
예제 #5
0
 def test_adding(self):
     self.create('video1')
     self.assertTrue(IVideoEnabled.providedBy(self.portal['video1']))
예제 #6
0
 def test_factory(self):
     fti = self.getFti()
     factory = fti.factory
     new_object = createObject(factory)
     self.assertTrue(IVideoEnabled.providedBy(new_object))