def test_validate_invariants_edge(self):
        data = MockProgram()
        data.start = datetime.datetime(2009, 1, 2)
        data.end = datetime.datetime(2009, 1, 2)

        try:
            IProgram.validateInvariants(data)
        except:
            self.fail()
    def test_validate_invariants_edge(self):
        data = MockProgram()
        data.start = datetime.datetime(2009, 1, 2)
        data.end = datetime.datetime(2009, 1, 2)

        try:
            IProgram.validateInvariants(data)
        except:
            self.fail()
    def test_validate_invariants_fail(self):
        data = MockProgram()
        data.start = datetime.datetime(2009, 1, 2)
        data.end = datetime.datetime(2009, 1, 1)

        try:
            IProgram.validateInvariants(data)
            self.fail()
        except StartBeforeEnd:
            pass
    def test_validate_invariants_fail(self):
        data = MockProgram()
        data.start = datetime.datetime(2009, 1, 2)
        data.end = datetime.datetime(2009, 1, 1)

        try:
            IProgram.validateInvariants(data)
            self.fail()
        except StartBeforeEnd:
            pass
 def test_adding(self):
     self.folder.invokeFactory('collective.conference.program', 'program1')
     p1 = self.folder['program1']
     self.failUnless(IProgram.providedBy(p1))
 def test_factory(self):
     fti = queryUtility(IDexterityFTI, name='collective.conference.program')
     factory = fti.factory
     new_object = createObject(factory)
     self.failUnless(IProgram.providedBy(new_object))
 def test_adding(self):
     self.folder.invokeFactory('collective.conference.program', 'program1')
     p1 = self.folder['program1']
     self.failUnless(IProgram.providedBy(p1))
 def test_factory(self):
     fti = queryUtility(IDexterityFTI, name='collective.conference.program')
     factory = fti.factory
     new_object = createObject(factory)
     self.failUnless(IProgram.providedBy(new_object))