本文整理匯總了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)