def testEndTimeBeforeStartTime(self):
     page = PostponementPage(owner=self.user)
     form = self.Form(
         {
             'overrides':
             self.event,
             'except_date':
             "2017-02-06",
             'date':
             "2017-02-07",
             'time_from':
             "13:00:00",
             'time_to':
             "04:00:00",
             'cancellation_title':
             "Meeting postponed",
             'cancellation_details':
             rich_text("The meeting has been postponed until tomorrow"),
             'postponement_title':
             "Committee Meeting"
         },
         instance=page,
         parent_page=self.event)
     self.assertFalse(form.is_valid())
     self.assertDictEqual(
         form.errors, {'time_to': ['Event cannot end before it starts']})
 def setUp(self):
     self.home = Page.objects.get(slug='home')
     self.user = User.objects.create_user('j', '*****@*****.**', 's3(r3t')
     self.request = RequestFactory().get("/test")
     self.request.user = self.user
     self.request.session = {}
     self.calendar = GeneralCalendarPage(owner=self.user,
                                         slug="events",
                                         title="Events")
     self.home.add_child(instance=self.calendar)
     self.calendar.save_revision().publish()
     self.event = RecurringEventPage(slug="test-meeting",
                                     title="Test Meeting",
                                     repeat=Recurrence(
                                         dtstart=dt.date(1990, 1, 1),
                                         freq=WEEKLY,
                                         byweekday=[MO, WE, FR]),
                                     time_from=dt.time(13, 30),
                                     time_to=dt.time(16))
     self.calendar.add_child(instance=self.event)
     self.postponement = PostponementPage(
         owner=self.user,
         overrides=self.event,
         except_date=dt.date(1990, 10, 10),
         cancellation_title="Meeting Postponed",
         cancellation_details=
         "The meeting has been postponed until tomorrow",
         postponement_title="A Meeting",
         date=dt.date(1990, 10, 11),
         time_from=dt.time(13),
         time_to=dt.time(16, 30),
         details="Yes a test meeting on a Thursday")
     self.event.add_child(instance=self.postponement)
     self.postponement.save_revision().publish()
 def setUp(self):
     self.home = Page.objects.get(slug='home')
     self.user = User.objects.create_user('j', '*****@*****.**', 's3(r3t')
     self.calendar = GeneralCalendarPage(owner=self.user,
                                         slug="events",
                                         title="Events")
     self.home.add_child(instance=self.calendar)
     self.calendar.save_revision().publish()
     self.event = RecurringEventPage(slug="test-meeting",
                                     title="Test Meeting",
                                     repeat=Recurrence(
                                         dtstart=dt.date(1990, 1, 1),
                                         freq=WEEKLY,
                                         byweekday=[MO, WE, FR]),
                                     time_from=dt.time(13, 30),
                                     time_to=dt.time(16),
                                     tz=pytz.timezone("US/Eastern"))
     self.calendar.add_child(instance=self.event)
     self.postponement = PostponementPage(
         owner=self.user,
         overrides=self.event,
         postponement_title="Delayed Meeting",
         except_date=dt.date(1990, 10, 10),
         date=dt.date(1990, 10, 11),
         time_from=dt.time(13),
         time_to=dt.time(16, 30))
     self.event.add_child(instance=self.postponement)
     self.postponement.save_revision().publish()
Example #4
0
 def setUp(self):
     self.home = Page.objects.get(slug='home')
     self.user = User.objects.create_user('i', '*****@*****.**', 's3cr3t')
     self.request = RequestFactory().get("/test")
     self.request.user = self.user
     self.request.session = {}
     self.request.site = Site.objects.get(is_default_site=True)
     self.group = GroupPage(slug = "initech", title = "Initech Corporation")
     self.home.add_child(instance=self.group)
     self.standup = RecurringEventPage(slug   = "test-meeting",
                                       title  = "Test Meeting",
                                       repeat = Recurrence(dtstart=dt.date(2013,1,1),
                                                           until=dt.date(2013,5,31),
                                                           freq=WEEKLY,
                                                           byweekday=[MO,WE,FR]),
                                       time_from = dt.time(13,30),
                                       time_to   = dt.time(16),
                                       uid       = "initiative+technology")
     self.group.add_child(instance=self.standup)
     self.postponement = PostponementPage(owner = self.user,
                                          slug  = "2013-01-09-postponement",
                                          title = "Postponement for Wednesday 16th of October",
                                          overrides = self.standup,
                                          except_date = dt.date(2013,1,16),
                                          cancellation_title   = "Meeting Postponed",
                                          cancellation_details =
                                              "The meeting has been postponed until tomorrow",
                                          postponement_title   = "A Meeting",
                                          date      = dt.date(2013,1,17),
                                          time_from = dt.time(13),
                                          time_to   = dt.time(16,30),
                                          details   = "Yes a test meeting on a Thursday")
     self.standup.add_child(instance=self.postponement)
 def testAt(self):
     self.assertEqual(self.postponement.at.strip(), "1pm")
     nextDate = self.event.next_date
     newDate = nextDate + dt.timedelta(1)
     reschedule = PostponementPage(
         owner=self.user,
         overrides=self.event,
         except_date=nextDate,
         cancellation_title="",
         cancellation_details="",
         postponement_title="Early Meeting",
         date=newDate,
         time_from=dt.time(8, 30),
         time_to=dt.time(11),
         details="The meeting will be held early tomorrow")
     self.event.add_child(instance=reschedule)
     nextOn = self.event._nextOn(self.request)
     url = "/events/test-meeting/{}-postponement/".format(nextDate)
     self.assertEqual(nextOn[:76],
                      '<a class="inline-link" href="{}">'.format(url))
     self.assertEqual(nextOn[-4:], '</a>')
     parts = nextOn[76:-4].split()
     self.assertEqual(len(parts), 6)
     self.assertEqual(parts[0], "{:%A}".format(newDate))
     self.assertEqual(int(parts[1][:-2]), newDate.day)
     self.assertIn(parts[1][-2:], ["st", "nd", "rd", "th"])
     self.assertEqual(parts[2], "of")
     self.assertEqual(parts[3], "{:%B}".format(newDate))
     self.assertEqual(parts[4], "at")
     self.assertEqual(parts[5], "8:30am")
Example #6
0
 def testPostponementOccurenceLast(self):
     request = RequestFactory().get("/test")
     request.user = self.user
     request.session = {}
     event = RecurringEventPage(owner = self.user,
                                slug  = "breakfast3",
                                title = "Breakfast-in-bed",
                                repeat = Recurrence(dtstart=dt.date(2008,2,1),
                                                    until=dt.date(2008,5,9),
                                                    freq=WEEKLY,
                                                    byweekday=[SA,SU]),
                                time_from = dt.time(8),
                                time_to   = dt.time(9))
     self.calendar.add_child(instance=event)
     postponement = PostponementPage(owner = self.user,
                                     overrides = event,
                                     except_date = dt.date(2008, 5, 3),
                                     postponement_title = "Breakfast in Bed owed from May",
                                     date      = dt.date(2008, 5, 24),
                                     time_from = dt.time(8),
                                     time_to   = dt.time(9))
     event.add_child(instance=postponement)
     self.assertIsNone(event.status)
     self.assertEqual(event._nextOn(request),
                      '<a class="inline-link" href="/events/breakfast3/2008-05-03-postponement/">Saturday 24th of May at 8am</a>')
 def testWhatRescheduled(self):
     reschedule = PostponementPage(owner=self.user,
                                   overrides=self.event,
                                   except_date=dt.date(1991, 1, 7),
                                   date=dt.date(1991, 1, 6),
                                   postponement_title="Rescheduled")
     self.event.add_child(instance=reschedule)
     self.assertEqual(reschedule.what, "Rescheduled")
Example #8
0
 def testFromCalendarPage(self):
     page = RecurringEventPage(owner=self.user,
                               slug="chess",
                               title="Chess",
                               repeat=Recurrence(dtstart=dt.date(
                                   2000, 1, 1),
                                                 freq=WEEKLY,
                                                 byweekday=[MO, WE, FR]),
                               time_from=dt.time(12),
                               time_to=dt.time(13))
     self.calendar.add_child(instance=page)
     page.save_revision().publish()
     cancellation = CancellationPage(
         owner=self.user,
         slug="2019-02-04-cancellation",
         title="Cancellation for Monday 4th of February",
         overrides=page,
         except_date=dt.date(2019, 2, 4),
         cancellation_title="No Chess Club Today")
     page.add_child(instance=cancellation)
     cancellation.save_revision().publish()
     postponement = PostponementPage(
         owner=self.user,
         slug="2019-10-02-postponement",
         title="Postponement for Wednesday 2nd of October",
         overrides=page,
         except_date=dt.date(2019, 10, 2),
         cancellation_title="",
         postponement_title="Early Morning Matches",
         date=dt.date(2019, 10, 3),
         time_from=dt.time(7, 30),
         time_to=dt.time(8, 30))
     page.add_child(instance=postponement)
     postponement.save_revision().publish()
     vcal = VCalendar.fromPage(self.calendar, self._getRequest("/events/"))
     export = vcal.to_ical()
     props = [
         b"SUMMARY:Chess",
         b"DTSTART;TZID=Asia/Tokyo:20000103T120000",
         b"DTEND;TZID=Asia/Tokyo:20000103T130000",
         b"DTSTAMP:20190121T060000Z",
         b"UID:",
         b"SEQUENCE:1",
         b"RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR;WKST=SU",
         b"EXDATE;TZID=Asia/Tokyo:20190204T120000",
         b"CREATED:20190121T060000Z",
         b"DESCRIPTION:",
         b"LAST-MODIFIED:20190121T060000Z",
         b"LOCATION:",
         b"URL:http://joy.test/events/chess/",
         b"SUMMARY:Early Morning Matches",
         b"DTSTART;TZID=Asia/Tokyo:20191003T073000",
         b"DTEND;TZID=Asia/Tokyo:20191003T083000",
         b"RECURRENCE-ID;TZID=Asia/Tokyo:20191002T120000",
     ]
     for prop in props:
         with self.subTest(prop=prop):
             self.assertIn(prop, export)
 def testWhatSameTime(self):
     change = PostponementPage(owner=self.user,
                               overrides=self.event,
                               except_date=dt.date(1991, 1, 7),
                               date=dt.date(1991, 1, 7),
                               time_from=dt.time(13, 30),
                               time_to=dt.time(16),
                               postponement_title="Small Change")
     self.event.add_child(instance=change)
     self.assertIsNone(change.what)
Example #10
0
    def testServePostponement(self):
        imgFile = get_test_image_file(filename="logo2.png", colour="red")
        newLogo = Image.objects.create(title="Logo", file=imgFile)
        imgName = os.path.splitext(os.path.basename(newLogo.file.name))[0]
        newLogoRender = "{}.width-350.format-png.png".format(imgName)
        postponement = PostponementPage(owner = self.user,
                                        overrides = self.event,
                                        except_date = dt.date(2017,4,4),
                                        image = newLogo,
                                        cancellation_title   = "Workshop Postponed",
                                        cancellation_details = "Workshop will take place next week",
                                        postponement_title   = "Workshop",
                                        date      = dt.date(2017, 4, 11),
                                        details   = "Interesting stuff")
        self.event.add_child(instance=postponement)
        postponement.save_revision().publish()
        response = self.handler.serve(self.calendar,
                                      self._getRequest("/events/"))
        self.assertEqual(response.status_code, 200)
        soup = BeautifulSoup(response.content, "xml")
        channel = soup.channel
        self.assertEqual(channel.title.string, "Events")
        self.assertEqual(len(channel("item")), 3)
        item1 = channel("item")[1]
        self.assertEqual(item1.title.string, "Workshop Postponed")
        self.assertEqual(item1.link.string, "http://joy.test/events/workshop/2017-04-04-postponement/from/")
        self.assertEqual(item1.enclosure.decode(),
                         '<enclosure length="773" type="image/png" '
                         'url="http://joy.test/media/images/{}"/>'.format(self.rendName))
        self.assertEqual(item1.description.decode(), """<description>\n\n\n
  &lt;div class="joy-ev-when joy-field"&gt;
    Tuesday 4th of April 2017
  &lt;/div&gt;\n\n\n\n
&lt;div class="rich-text"&gt;Workshop will take place next week&lt;/div&gt;\n</description>""")
        self.assertEqual(item1.guid.get("isPermaLink"), "true")
        self.assertEqual(item1.guid.string, "http://joy.test/events/workshop/2017-04-04-postponement/from/")
        self.assertEqual(item1.pubDate.string, "Sat, 26 Mar 2016 00:00:00 +0000")
        item2 = channel("item")[2]
        self.assertEqual(item2.title.string, "Workshop")
        self.assertEqual(item2.link.string, "http://joy.test/events/workshop/2017-04-04-postponement/")
        self.assertEqual(item2.enclosure.decode(),
                         '<enclosure length="773" type="image/png" '
                         'url="http://joy.test/media/images/{}"/>'.format(newLogoRender))
        self.assertEqual(item2.description.decode(), """<description>\n\n\n
  &lt;div class="joy-ev-when joy-field"&gt;
    Tuesday 11th of April 2017
  &lt;/div&gt;\n
  &lt;div class="joy-ev-from-when joy-field"&gt;
    Postponed from Tuesday 4th of April 2017
  &lt;/div&gt;\n\n\n\n
&lt;div class="rich-text"&gt;Interesting stuff&lt;/div&gt;\n</description>""")
        self.assertEqual(item2.guid.get("isPermaLink"), "true")
        self.assertEqual(item2.guid.string, "http://joy.test/events/workshop/2017-04-04-postponement/")
        self.assertEqual(item2.pubDate.string, "Sat, 26 Mar 2016 00:00:00 +0000")
Example #11
0
 def testIdentifyExpectantParent(self):
     postponement = PostponementPage()
     identifyExpectantParent(self.testIdentifyExpectantParent,
                             parent=self.event,
                             page=postponement)
     self.assertEqual(postponement.overrides, self.event)
     self.assertEqual(postponement.except_date, dt.date(1991, 1, 2))
     self.assertEqual(postponement.date, dt.date(1991, 1, 3))
     self.assertEqual(postponement.postponement_title, "Test Meeting")
     self.assertIsNone(postponement.category)
     self.assertEqual(postponement.num_days, 1)
     self.assertEqual(postponement.time_from, dt.time(13, 30))
     self.assertEqual(postponement.time_to, dt.time(16))
Example #12
0
    def testServePostponement(self):
        postponement = PostponementPage(
            owner=self.user,
            overrides=self.event,
            except_date=dt.date(2017, 4, 4),
            image=self.img,
            cancellation_title="Workshop Postponed",
            cancellation_details="Workshop will take place next week",
            postponement_title="Workshop",
            date=dt.date(2017, 4, 11),
            details="Interesting stuff")
        self.event.add_child(instance=postponement)
        postponement.save_revision().publish()
        response = self.handler.serve(self.calendar,
                                      self._getRequest("/events/"))
        self.assertEqual(response.status_code, 200)
        soup = BeautifulSoup(response.content, "xml")
        channel = soup.channel
        self.assertEqual(channel.title.string, "Events")
        self.assertEqual(len(channel("item")), 2)
        item = channel("item")[1]
        self.assertEqual(item.title.string, "Workshop")
        self.assertEqual(
            item.link.string,
            "http://joy.test/events/workshop/2017-04-04-postponement/")
        self.assertEqual(
            item.enclosure.decode(),
            '<enclosure length="773" type="image/png" '
            'url="http://joy.test/media/images/{}"/>'.format(self.rendName))
        self.assertEqual(
            item.description.decode(), """<description>\n\n\n
  &lt;div class="joy-ev-when joy-field"&gt;
    Tuesday 11th of April 2017
  &lt;/div&gt;\n
  &lt;div class="joy-ev-from-when joy-field"&gt;
    Postponed from Tuesday 4th of April 2017
  &lt;/div&gt;\n\n\n\n
&lt;div class="rich-text"&gt;Interesting stuff&lt;/div&gt;\n</description>""")
        self.assertEqual(item.guid.get("isPermaLink"), "true")
        self.assertEqual(
            item.guid.string,
            "http://joy.test/events/workshop/2017-04-04-postponement/")
        self.assertEqual(item.pubDate.string,
                         "Sat, 26 Mar 2016 00:00:00 +0000")
Example #13
0
 def testStatus(self):
     self.assertEqual(self.postponement.status, "finished")
     self.assertEqual(self.postponement.status_text, "This event has finished.")
     now = timezone.localtime()
     myday = now.date() + dt.timedelta(1)
     friday = myday + dt.timedelta(days=(4-myday.weekday())%7)
     futureEvent = PostponementPage(owner = self.user,
                                    overrides = self.event,
                                    except_date = friday,
                                    cancellation_title   = "",
                                    cancellation_details = "",
                                    postponement_title   = "Tuesday Meeting",
                                    date      = friday + dt.timedelta(days=4),
                                    time_from = dt.time(13,30),
                                    time_to   = dt.time(16),
                                    details   = "The meeting postponed from last Friday")
     self.event.add_child(instance=futureEvent)
     self.assertIsNone(futureEvent.status)
     self.assertEqual(futureEvent.status_text, "")
Example #14
0
 def testPostponement(self):
     page = RecurringEventPage(
         owner=self.user,
         slug="code-for-boston",
         title="Code for Boston",
         repeat=Recurrence(dtstart=dt.date(2017, 1, 1),
                           freq=WEEKLY,
                           byweekday=[TU],
                           until=dt.date(2017, 12, 26)),
         time_from=dt.time(19),
         time_to=dt.time(21, 30),
         tz=pytz.timezone("US/Eastern"),
         location="4th Floor, 1 Broadway, Cambridge, MA")
     self.calendar.add_child(instance=page)
     page.save_revision().publish()
     post = PostponementPage(owner=self.user,
                             slug="2017-06-13-postponement",
                             title="Postponement for Tuesday 13th of June",
                             postponement_title="Code for Boston (on Weds)",
                             overrides=page,
                             except_date=dt.date(2017, 6, 13),
                             date=dt.date(2017, 6, 14))
     page.add_child(instance=post)
     post.save_revision().publish()
     vev = VEventFactory().makeFromPage(page)
     self.assertIs(type(vev), RecurringVEvent)
     self.assertEqual(len(vev.vchildren), 1)
     vchild = vev.vchildren[0]
     vchild.set('UID', "this-is-not-a-unique-identifier")
     self.assertIs(type(vchild), PostponementVEvent)
     talk = b"\r\n".join([
         b"BEGIN:VEVENT", b"SUMMARY:Code for Boston (on Weds)",
         b"DTSTART;TZID=US/Eastern:20170614T000000",
         b"DTEND;TZID=US/Eastern:20170614T235959",
         b"DTSTAMP:20170515T000000Z",
         b"UID:this-is-not-a-unique-identifier",
         b"RECURRENCE-ID;TZID=US/Eastern:20170613T190000", b"SEQUENCE:1",
         b"CREATED:20170515T000000Z", b"DESCRIPTION:",
         b"LAST-MODIFIED:20170515T000000Z", b"LOCATION:",
         b"URL:http://joy.test/events/code-for-boston/2017-06-13-postponement/",
         b"END:VEVENT", b""
     ])
     self.assertEqual(vchild.to_ical(), talk)
Example #15
0
 def _setUpMainSite(self):
     Site.objects.filter(is_default_site=True).update(hostname="joy.test")
     home = getPage("/home/")
     events = CalendarPage(owner=self.user, slug="events", title="Events")
     home.add_child(instance=events)
     events.save_revision().publish()
     chess = GroupPage(slug="chess-club", title="Chess Club")
     home.add_child(instance=chess)
     chess.save_revision().publish()
     event = RecurringEventPage(owner=self.user,
                                slug="lunchtime-matches",
                                title="Lunchtime Chess Matches",
                                repeat=Recurrence(dtstart=dt.date(
                                    1984, 8, 5),
                                                  freq=WEEKLY,
                                                  byweekday=[MO, WE, FR]),
                                time_from=dt.time(12),
                                time_to=dt.time(13))
     chess.add_child(instance=event)
     event.save_revision().publish()
     cancellation = CancellationPage(
         owner=self.user,
         slug="1984-10-01-cancellation",
         title="Cancellation for Monday 1st of October",
         overrides=event,
         except_date=dt.date(1984, 10, 1),
         cancellation_title="No Chess Club Today")
     event.add_child(instance=cancellation)
     cancellation.save_revision().publish()
     postponement = PostponementPage(
         owner=self.user,
         slug="1984-10-03-postponement",
         title="Postponement for Wednesday 3rd of October",
         overrides=event,
         except_date=dt.date(1984, 10, 3),
         cancellation_title="",
         postponement_title="Early Morning Matches",
         date=dt.date(1984, 10, 4),
         time_from=dt.time(7, 30),
         time_to=dt.time(8, 30))
     event.add_child(instance=postponement)
     postponement.save_revision().publish()
     event = RecurringEventPage(owner=self.user,
                                slug="flea-market",
                                title="Flea Market",
                                repeat=Recurrence(dtstart=dt.date(
                                    1984, 7, 1),
                                                  freq=YEARLY,
                                                  byweekday=[SA(1),
                                                             SA(3)],
                                                  bymonth=range(2, 12)),
                                time_from=dt.time(8),
                                time_to=dt.time(13))
     events.add_child(instance=event)
     event.save_revision().publish()
     event = RecurringEventPage(owner=self.user,
                                slug="drama-practice",
                                title="Drama Group",
                                repeat=Recurrence(dtstart=dt.date(
                                    1984, 8, 14),
                                                  freq=WEEKLY,
                                                  byweekday=[TH],
                                                  interval=2),
                                time_from=dt.time(17))
     events.add_child(instance=event)
     event.save_revision().publish()
     event = SimpleEventPage(owner=self.user,
                             slug="public-lecture3",
                             title="The Human Environment",
                             date=dt.date(1984, 9, 14),
                             time_from=dt.time(19),
                             location="Lecture Hall C")
     events.add_child(instance=event)
     event.save_revision().publish()
Example #16
0
    def setUp(self):
        self.home = Page.objects.get(slug='home')
        self.user = User.objects.create_user('i', '*****@*****.**', 's3cr3t')
        self.request = RequestFactory().get("/test")
        self.request.user = self.user
        self.request.session = {}
        self.calendar = GeneralCalendarPage(owner = self.user,
                                            slug  = "events",
                                            title = "Events")
        self.home.add_child(instance=self.calendar)
        self.group = GroupPage(slug = "initech", title = "Initech Corporation")
        self.home.add_child(instance=self.group)

        self.show = SimpleEventPage(owner = self.user,
                                    slug   = "pet-show",
                                    title  = "Pet Show",
                                    date      = dt.date(2013,1,5),
                                    time_from = dt.time(11),
                                    time_to   = dt.time(17,30),
                                    uid       = "29daefed-fed1-4e47-9408-43ec9b06a06d")
        self.calendar.add_child(instance=self.show)

        GROUPS = PageViewRestriction.GROUPS
        self.friends = Group.objects.create(name = "Friends")
        self.rendezvous = SimpleEventPage(owner = self.user,
                                          slug   = "rendezvous",
                                          title  = "Private Rendezvous",
                                          date      = dt.date(2013,1,10),
                                          uid       = "80af64e7-84e6-40d9-8b4f-7edf92aab9f7")
        self.calendar.add_child(instance=self.rendezvous)
        self.rendezvous.save_revision().publish()
        restriction = PageViewRestriction.objects.create(restriction_type = GROUPS,
                                                         page = self.rendezvous)
        restriction.groups.set([self.friends])
        restriction.save()

        self.party = MultidayEventPage(owner = self.user,
                                       slug  = "allnighter",
                                       title = "All Night",
                                       date_from = dt.date(2012,12,31),
                                       date_to   = dt.date(2013,1,1),
                                       time_from = dt.time(23),
                                       time_to   = dt.time(3),
                                       uid       = "initiative+technology")
        self.calendar.add_child(instance=self.party)

        self.standup = RecurringEventPage(slug   = "test-meeting",
                                          title  = "Test Meeting",
                                          repeat = Recurrence(dtstart=dt.date(2013,1,1),
                                                              until=dt.date(2013,5,31),
                                                              freq=WEEKLY,
                                                              byweekday=[MO,WE,FR]),
                                          time_from = dt.time(13,30),
                                          time_to   = dt.time(16),
                                          uid       = "initiative+technology")
        self.group.add_child(instance=self.standup)

        self.postponement = PostponementPage(owner = self.user,
                                             slug  = "2013-01-09-postponement",
                                             title = "Postponement for Wednesday 16th of October",
                                             overrides = self.standup,
                                             except_date = dt.date(2013,1,16),
                                             cancellation_title   = "Meeting Postponed",
                                             cancellation_details =
                                                 "The meeting has been postponed until tomorrow",
                                             postponement_title   = "A Meeting",
                                             date      = dt.date(2013,1,17),
                                             time_from = dt.time(13),
                                             time_to   = dt.time(16,30),
                                             details   = "Yes a test meeting on a Thursday")
        self.standup.add_child(instance=self.postponement)

        cancelTuesday = CancellationPage(owner = self.user,
                                         slug  = "2013-01-01-cancellation",
                                         title = "CancellationPage for Tuesday 1st of January",
                                         overrides = self.standup,
                                         except_date = dt.date(2013,1,1),
                                         cancellation_title   = "Meeting Cancelled")
        self.standup.add_child(instance=cancelTuesday)