Ejemplo n.º 1
0
 def testSubSiteAnotherCalendar(self):
     calendar = CalendarPage(owner  = self.user,
                             slug  = "events",
                             title = "Events")
     self.main.add_child(instance=calendar)
     calendar.save_revision().publish()
     self.assertTrue(CalendarPage.can_create_at(self.sub))
Ejemplo n.º 2
0
 def testCalendarMixture(self):
     general = GeneralCalendarPage(owner=self.user,
                                   slug="events1",
                                   title="Events")
     self.main.add_child(instance=general)
     general.save_revision().publish()
     self.assertTrue(CalendarPage.can_create_at(self.main))
     calendar = CalendarPage(owner=self.user,
                             slug="events2",
                             title="Events")
     self.main.add_child(instance=calendar)
     calendar.save_revision().publish()
     self.assertTrue(SpecificCalendarPage.can_create_at(self.main))
     specific = SpecificCalendarPage(owner=self.user,
                                     slug="events3",
                                     title="Events")
     self.main.add_child(instance=specific)
     specific.save_revision().publish()
Ejemplo n.º 3
0
 def testNoSiteAnotherCalendar(self):
     rogue = Page(slug="rogue", title="Rogue")
     self.assertFalse(CalendarPage.can_create_at(rogue))