def setUp(self): AbstractSampleDataEvents.setUp(self) # add extra events to the base setup factory = self.event_factory factory( container=self.portal, content_id='past_recur', title=u'Past Recur', start=self.past + self.duration, end=self.past + self.duration + self.duration, location=u"Dornbirn", recurrence='RRULE:FREQ=WEEKLY;COUNT=4', ) # data_postprocessing normalization is not needed, as we values are set # correctly in the first place. tomorrow = factory( container=self.portal, content_id='tomorrow', title=u'Tomorrow event', start=self.tomorrow, end=self.tomorrow + self.duration, open_end=True, location=u"Dornbirn", ) # Normalize values and reindex, what normally the form would do # (especially, end time isn't set like open_end settings requests to. data_postprocessing_context(tomorrow) tomorrow.reindexObject() self.occ = [ (u'Past Event', '2013-04-25 00:00:00', '2013-04-25 23:59:59'), (u'Long Event', '2013-04-25 10:00:00', '2013-06-04 10:00:00'), (u'Past Recur', '2013-04-25 11:00:00', '2013-04-25 12:00:00'), (u'Past Event', '2013-04-26 00:00:00', '2013-04-26 23:59:59'), (u'Past Event', '2013-04-27 00:00:00', '2013-04-27 23:59:59'), (u'Past Recur', '2013-05-02 11:00:00', '2013-05-02 12:00:00'), (u'Now Event', '2013-05-05 10:00:00', '2013-05-05 11:00:00'), (u'Tomorrow event', '2013-05-06 10:00:00', '2013-05-06 23:59:59'), (u'Now Event', '2013-05-07 10:00:00', '2013-05-07 11:00:00'), (u'Now Event', '2013-05-09 10:00:00', '2013-05-09 11:00:00'), (u'Past Recur', '2013-05-09 11:00:00', '2013-05-09 12:00:00'), (u'Future Event', '2013-05-15 10:00:00', '2013-05-15 11:00:00'), (u'Past Recur', '2013-05-16 11:00:00', '2013-05-16 12:00:00')]
def setUp(self): AbstractSampleDataEvents.setUp(self) # add extra events to the base setup factory = self.event_factory factory( container=self.portal, content_id='past_recur', title=u'Past Recur', start=self.past + self.duration, end=self.past + self.duration + self.duration, location=u"Dornbirn", recurrence='RRULE:FREQ=WEEKLY;COUNT=4', ) tomorrow = factory( container=self.portal, content_id='tomorrow', title=u'Tomorrow event', start=self.tomorrow, end=self.tomorrow + self.duration, open_end=True, location=u"Dornbirn", ) tomorrow.reindexObject() self.occ = [ (u'Past Event', '2013-04-25 00:00:00', '2013-04-25 23:59:59'), (u'Long Event', '2013-04-25 10:00:00', '2013-06-04 10:00:00'), (u'Past Recur', '2013-04-25 11:00:00', '2013-04-25 12:00:00'), (u'Past Event', '2013-04-26 00:00:00', '2013-04-26 23:59:59'), (u'Past Event', '2013-04-27 00:00:00', '2013-04-27 23:59:59'), (u'Past Recur', '2013-05-02 11:00:00', '2013-05-02 12:00:00'), (u'Now Event', '2013-05-05 10:00:00', '2013-05-05 11:00:00'), (u'Tomorrow event', '2013-05-06 10:00:00', '2013-05-06 23:59:59'), (u'Now Event', '2013-05-07 10:00:00', '2013-05-07 11:00:00'), (u'Now Event', '2013-05-09 10:00:00', '2013-05-09 11:00:00'), (u'Past Recur', '2013-05-09 11:00:00', '2013-05-09 12:00:00'), (u'Future Event', '2013-05-15 10:00:00', '2013-05-15 11:00:00'), (u'Past Recur', '2013-05-16 11:00:00', '2013-05-16 12:00:00') ]
def setUp(self): AbstractSampleDataEvents.setUp(self) # add extra events to the base setup factory = self.event_factory factory( container=self.portal, content_id="past_recur", title=u"Past Recur", start=self.past + self.duration, end=self.past + self.duration + self.duration, location=u"Dornbirn", recurrence="RRULE:FREQ=WEEKLY;COUNT=4", ) tomorrow = factory( container=self.portal, content_id="tomorrow", title=u"Tomorrow event", start=self.tomorrow, end=self.tomorrow + self.duration, open_end=True, location=u"Dornbirn", ) tomorrow.reindexObject() self.occ = [ (u"Past Event", "2013-04-25 00:00:00", "2013-04-25 23:59:59"), (u"Long Event", "2013-04-25 10:00:00", "2013-06-04 10:00:00"), (u"Past Recur", "2013-04-25 11:00:00", "2013-04-25 12:00:00"), (u"Past Event", "2013-04-26 00:00:00", "2013-04-26 23:59:59"), (u"Past Event", "2013-04-27 00:00:00", "2013-04-27 23:59:59"), (u"Past Recur", "2013-05-02 11:00:00", "2013-05-02 12:00:00"), (u"Now Event", "2013-05-05 10:00:00", "2013-05-05 11:00:00"), (u"Tomorrow event", "2013-05-06 10:00:00", "2013-05-06 23:59:59"), (u"Now Event", "2013-05-07 10:00:00", "2013-05-07 11:00:00"), (u"Now Event", "2013-05-09 10:00:00", "2013-05-09 11:00:00"), (u"Past Recur", "2013-05-09 11:00:00", "2013-05-09 12:00:00"), (u"Future Event", "2013-05-15 10:00:00", "2013-05-15 11:00:00"), (u"Past Recur", "2013-05-16 11:00:00", "2013-05-16 12:00:00"), ]
def setUp(self): AbstractSampleDataEvents.setUp(self) # add extra events to the base setup factory = self.event_factory() factory( container=self.portal, content_id='past_recur', title=u'Past Recur', start=self.past + self.duration, end=self.past + self.duration + self.duration, location=u"Dornbirn", timezone=TEST_TIMEZONE, recurrence='RRULE:FREQ=WEEKLY;COUNT=4', ) factory( container=self.portal, content_id='tomorrow', title=u'Tomorrow event', start=self.tomorrow, end=self.tomorrow + self.duration, open_end=True, location=u"Dornbirn", timezone=TEST_TIMEZONE, ) self.occ = [ (u'Past Event', '2013-04-25 00:00:00', '2013-04-25 23:59:59'), (u'Long Event', '2013-04-25 10:00:00', '2013-06-04 10:00:00'), (u'Past Recur', '2013-04-25 11:00:00', '2013-04-25 12:00:00'), (u'Past Event', '2013-04-26 00:00:00', '2013-04-26 23:59:59'), (u'Past Event', '2013-04-27 00:00:00', '2013-04-27 23:59:59'), (u'Past Recur', '2013-05-02 11:00:00', '2013-05-02 12:00:00'), (u'Now Event', '2013-05-05 10:00:00', '2013-05-05 11:00:00'), (u'Tomorrow event', '2013-05-06 10:00:00', '2013-05-06 23:59:59'), (u'Now Event', '2013-05-07 10:00:00', '2013-05-07 11:00:00'), (u'Now Event', '2013-05-09 10:00:00', '2013-05-09 11:00:00'), (u'Past Recur', '2013-05-09 11:00:00', '2013-05-09 12:00:00'), (u'Future Event', '2013-05-15 10:00:00', '2013-05-15 11:00:00'), (u'Past Recur', '2013-05-16 11:00:00', '2013-05-16 12:00:00')]
def tearDown(self): self.portal.manage_delObjects(['past_recur', 'tomorrow']) AbstractSampleDataEvents.tearDown(self)