def test_createlink(self):
     cal = self.folder["calendar-folder"]
     creator = IWebEventCreator(cal)
     link = creator.url()
     self.failUnlessEqual(
         link, "http://nohost/plone/Members/test_user_1_/calendar-folder/createObject?type_name=Event"
     )
예제 #2
0
    def has_ical_support(self):
        if self.__name__ == 'import.html':
            # Check that we are not read only.
            provider = IWebEventCreator(self.context)
            if not provider.canCreate():
                return False

        # Now check that Calendaring is installed properly.
        ct = getToolByName(self, 'portal_calendar')
        try:
            ct.exportCalendar(events=[])
            return True
        except TypeError:
            return False
 def test_createlink(self):
     cal = self.folder["calendar-topic"]
     creator = IWebEventCreator(cal)
     self.failIf(creator.canCreate())