本文整理汇总了Python中calendarserver.tools.purge.PurgePrincipalService._cancelEvent方法的典型用法代码示例。如果您正苦于以下问题:Python PurgePrincipalService._cancelEvent方法的具体用法?Python PurgePrincipalService._cancelEvent怎么用?Python PurgePrincipalService._cancelEvent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类calendarserver.tools.purge.PurgePrincipalService
的用法示例。
在下文中一共展示了PurgePrincipalService._cancelEvent方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_cancelAsAttendeeMultipleOccurrences
# 需要导入模块: from calendarserver.tools.purge import PurgePrincipalService [as 别名]
# 或者: from calendarserver.tools.purge.PurgePrincipalService import _cancelEvent [as 别名]
def test_cancelAsAttendeeMultipleOccurrences(self):
# Multiple meeting occurrences with no master, where purged CUA is
# an attendee
event = Component.fromString(INVITED_TO_MULTIPLE_OCCURRENCES_ICS)
action = PurgePrincipalService._cancelEvent(event, PyCalendarDateTime(2010, 12, 6, 12, 0, 0, PyCalendarTimezone(utc=True)),
"urn:uuid:9DC04A71-E6DD-11DF-9492-0800200C9A66")
self.assertEquals(action, PurgePrincipalService.CANCELEVENT_SHOULD_DELETE)
示例2: test_cancelAllDayRepeating
# 需要导入模块: from calendarserver.tools.purge import PurgePrincipalService [as 别名]
# 或者: from calendarserver.tools.purge.PurgePrincipalService import _cancelEvent [as 别名]
def test_cancelAllDayRepeating(self):
# A repeating All Day event where purged CUA is organizer
event = Component.fromString(REPEATING_2_ICS_BEFORE)
action = PurgePrincipalService._cancelEvent(event, PyCalendarDateTime(2010, 12, 6, 12, 0, 0, PyCalendarTimezone(utc=True)),
"urn:uuid:0F168477-CF3D-45D3-AE60-9875EA02C4D1")
self.assertEquals(action, PurgePrincipalService.CANCELEVENT_MODIFIED)
self.assertEquals(str(event), REPEATING_2_ICS_AFTER)
示例3: test_cancelAsAttendee
# 需要导入模块: from calendarserver.tools.purge import PurgePrincipalService [as 别名]
# 或者: from calendarserver.tools.purge.PurgePrincipalService import _cancelEvent [as 别名]
def test_cancelAsAttendee(self):
# A repeating meeting event where purged CUA is an attendee
event = Component.fromString(REPEATING_ATTENDEE_MEETING_ICS)
action = PurgePrincipalService._cancelEvent(event, PyCalendarDateTime(2010, 12, 6, 12, 0, 0, PyCalendarTimezone(utc=True)),
"urn:uuid:0F168477-CF3D-45D3-AE60-9875EA02C4D1")
self.assertEquals(action, PurgePrincipalService.CANCELEVENT_SHOULD_DELETE)
示例4: test_cancelFutureEvent
# 需要导入模块: from calendarserver.tools.purge import PurgePrincipalService [as 别名]
# 或者: from calendarserver.tools.purge.PurgePrincipalService import _cancelEvent [as 别名]
def test_cancelFutureEvent(self):
# A future event
event = Component.fromString(FUTURE_EVENT_ICS)
action = PurgePrincipalService._cancelEvent(event, PyCalendarDateTime(2010, 12, 6, 12, 0, 0, PyCalendarTimezone(utc=True)),
"urn:uuid:0F168477-CF3D-45D3-AE60-9875EA02C4D1")
self.assertEquals(action, PurgePrincipalService.CANCELEVENT_SHOULD_DELETE)
示例5: test_cancelNonMeeting
# 需要导入模块: from calendarserver.tools.purge import PurgePrincipalService [as 别名]
# 或者: from calendarserver.tools.purge.PurgePrincipalService import _cancelEvent [as 别名]
def test_cancelNonMeeting(self):
# A repeating non-meeting event
event = Component.fromString(REPEATING_NON_MEETING_ICS)
action = PurgePrincipalService._cancelEvent(event, DateTime(2010, 12, 6, 12, 0, 0, Timezone(utc=True)),
"urn:uuid:0F168477-CF3D-45D3-AE60-9875EA02C4D1")
self.assertEquals(action, PurgePrincipalService.CANCELEVENT_SHOULD_DELETE)