Ejemplo n.º 1
0
 def TalkRoom(self):
    from collective.conference.track import ITrack
    parent = aq_parent(aq_inner(self.context))
    if ITrack.providedBy(parent):
        room = parent.room.to_object.title
    else: room = ""
    return room
Ejemplo n.º 2
0
    def test_adding(self):

        # We can't add this directly
        try:
            self.folder.invokeFactory('collective.conference.trackk', 'track1')
            self.fail('Conference tracks should not be addable except within conference programs.')
        except (ValueError, Unauthorized):
            pass

        self.folder.invokeFactory('collective.conference.program', 'program1')
        p1 = self.folder['program1']

        p1.invokeFactory('collective.conference.track', 'track1')
        s1 = p1['track1']
        self.failUnless(ITrack.providedBy(s1))
Ejemplo n.º 3
0
    def test_adding(self):

        # We can't add this directly
        try:
            self.folder.invokeFactory('collective.conference.trackk', 'track1')
            self.fail(
                'Conference tracks should not be addable except within conference programs.'
            )
        except (ValueError, Unauthorized):
            pass

        self.folder.invokeFactory('collective.conference.program', 'program1')
        p1 = self.folder['program1']

        p1.invokeFactory('collective.conference.track', 'track1')
        s1 = p1['track1']
        self.failUnless(ITrack.providedBy(s1))
 def test_file_factory(self):
     self.folder.invokeFactory('collective.conference.program', 'p1')
     p1 = self.folder['p1']
     fileFactory = IFileFactory(p1)
     newObject = fileFactory('new-track', 'text/plain', 'dummy')
     self.failUnless(ITrack.providedBy(newObject))
Ejemplo n.º 5
0
 def test_factory(self):
     fti = queryUtility(IDexterityFTI, name='collective.conference.track')
     factory = fti.factory
     new_object = createObject(factory)
     self.failUnless(ITrack.providedBy(new_object))
Ejemplo n.º 6
0
 def test_file_factory(self):
     self.folder.invokeFactory('collective.conference.program', 'p1')
     p1 = self.folder['p1']
     fileFactory = IFileFactory(p1)
     newObject = fileFactory('new-track', 'text/plain', 'dummy')
     self.failUnless(ITrack.providedBy(newObject))
Ejemplo n.º 7
0
 def test_factory(self):
     fti = queryUtility(IDexterityFTI, name='collective.conference.track')
     factory = fti.factory
     new_object = createObject(factory)
     self.failUnless(ITrack.providedBy(new_object))