當前位置: 首頁>>代碼示例>>Python>>正文


Python PurgePrincipalService._cancelEvent方法代碼示例

本文整理匯總了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)
開發者ID:azbarcea,項目名稱:calendarserver,代碼行數:9,代碼來源:test_purge.py

示例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)
開發者ID:azbarcea,項目名稱:calendarserver,代碼行數:9,代碼來源:test_purge.py

示例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)
開發者ID:azbarcea,項目名稱:calendarserver,代碼行數:8,代碼來源:test_purge.py

示例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)
開發者ID:azbarcea,項目名稱:calendarserver,代碼行數:8,代碼來源:test_purge.py

示例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)
開發者ID:svn2github,項目名稱:calendarserver-raw,代碼行數:8,代碼來源:test_purge.py


注:本文中的calendarserver.tools.purge.PurgePrincipalService._cancelEvent方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。