[CalendarServer-changes] [9236] CalendarServer/trunk/calendarserver/tools
source_changes at macosforge.org
source_changes at macosforge.org
Tue May 8 20:19:38 PDT 2012
Revision: 9236
http://trac.macosforge.org/projects/calendarserver/changeset/9236
Author: cdaboo at apple.com
Date: 2012-05-08 20:19:37 -0700 (Tue, 08 May 2012)
Log Message:
-----------
Print out details about add/changed events for auto-accept calendar users.
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tools/calverify.py
CalendarServer/trunk/calendarserver/tools/test/calverify/resources.xml
CalendarServer/trunk/calendarserver/tools/test/test_calverify.py
Added Paths:
-----------
CalendarServer/trunk/calendarserver/tools/test/calverify/augments.xml
Modified: CalendarServer/trunk/calendarserver/tools/calverify.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/calverify.py 2012-05-08 22:09:08 UTC (rev 9235)
+++ CalendarServer/trunk/calendarserver/tools/calverify.py 2012-05-09 03:19:37 UTC (rev 9236)
@@ -46,6 +46,7 @@
from pycalendar.datetime import PyCalendarDateTime
from pycalendar.exceptions import PyCalendarError
from pycalendar.period import PyCalendarPeriod
+from pycalendar.timezone import PyCalendarTimezone
from twext.enterprise.dal.syntax import Select, Parameter, Count
from twisted.application.service import Service
from twisted.internet.defer import inlineCallbacks, returnValue, succeed
@@ -110,13 +111,14 @@
optFlags = [
['ical', 'i', "Calendar data check."],
- ['badcua', 'i', "Calendar data check for bad CALENDARSERVER-OLD-CUA only."],
+ ['badcua', 'b', "Calendar data check for bad CALENDARSERVER-OLD-CUA only."],
['nobase64', 'n', "Do not apply CALENDARSERVER-OLD-CUA base64 transform when fixing."],
['mismatch', 's', "Detect organizer/attendee mismatches."],
['missing', 'm', "Show 'orphaned' homes."],
['fix', 'x', "Fix problems."],
['verbose', 'v', "Verbose logging."],
['details', 'V', "Detailed logging."],
+ ['tzid', 't', "Timezone to adjust displayed times to."],
]
optParameters = [
@@ -192,6 +194,7 @@
self.fixOrganizersForAttendeeMissing = 0
self.fixOrganizersForAttendeeMismatch = 0
self.fixFailed = 0
+ self.fixedAutoAccepts = []
self.total = 0
self.totalErrors = None
self.totalExceptions = None
@@ -356,11 +359,14 @@
self.output.write("\n---- Scanning calendar data ----\n")
+ self.now = PyCalendarDateTime.getNowUTC()
self.start = start if start is not None else PyCalendarDateTime.getToday()
self.start.setDateOnly(False)
self.end = self.start.duplicate()
self.end.offsetYear(1)
self.fix = fix
+
+ self.tzid = PyCalendarTimezone(tzid=self.options["tzid"] if self.options["tzid"] else "America/Los_Angeles")
self.txn = self.store.newTransaction()
@@ -432,11 +438,14 @@
self.results["Fixed missing organizer events"] = self.fixOrganizersForAttendeeMissing
self.results["Fixed mismatched organizer events"] = self.fixOrganizersForAttendeeMismatch
self.results["Fix failures"] = self.fixFailed
+ self.results["Fixed Auto-Accepts"] = self.fixedAutoAccepts
self.addToSummary("Fixed missing attendee events", self.fixAttendeesForOrganizerMissing)
self.addToSummary("Fixed mismatched attendee events", self.fixAttendeesForOrganizerMismatch)
self.addToSummary("Fixed missing organizer events", self.fixOrganizersForAttendeeMissing)
self.addToSummary("Fixed mismatched organizer events", self.fixOrganizersForAttendeeMismatch)
self.addToSummary("Fix failures", self.fixFailed)
+
+ self.printAutoAccepts()
yield succeed(None)
@@ -1266,6 +1275,7 @@
if inbox is None:
raise ValueError("Cannot find inbox")
+ details = {}
# Replace existing resource data, or create a new one
if attresid:
# TODO: transfer over per-attendee data - valarms
@@ -1275,13 +1285,29 @@
calendarObj.scheduleTag = str(uuid.uuid4())
yield calendarObj.setComponent(attendee_calendar)
self.results.setdefault("Fix change event", set()).add((home.name(), calendar.name(), attendee_calendar.resourceUID(),))
+
+ details["path"] = "/calendars/__uids__/%s/%s/%s" % (home.name(), calendar.name(), calendarObj.name(),)
+ details["rid"] = attresid
else:
# Find default calendar for VEVENTs
defaultCalendar = (yield self.defaultCalendarForAttendee(home, inbox))
if defaultCalendar is None:
raise ValueError("Cannot find suitable default calendar")
- yield defaultCalendar.createCalendarObjectWithName(str(uuid.uuid4()) + ".ics", attendee_calendar, self.metadata)
+ new_name = str(uuid.uuid4()) + ".ics"
+ calendarObj = (yield defaultCalendar.createCalendarObjectWithName(new_name, attendee_calendar, self.metadata))
self.results.setdefault("Fix add event", set()).add((home.name(), defaultCalendar.name(), attendee_calendar.resourceUID(),))
+
+ details["path"] = "/calendars/__uids__/%s/%s/%s" % (home.name(), defaultCalendar.name(), new_name,)
+ details["rid"] = calendarObj._resourceID
+
+ details["uid"] = attendee_calendar.resourceUID()
+ instances = attendee_calendar.expandTimeRanges(self.end)
+ for key in instances:
+ instance = instances[key]
+ if instance.start > self.now:
+ break
+ details["start"] = instance.start.adjustTimezone(self.tzid)
+ details["title"] = instance.component.propertyValue("SUMMARY")
# Write new itip message to attendee inbox
yield inbox.createCalendarObjectWithName(str(uuid.uuid4()) + ".ics", itipmsg, self.metadata_inbox)
@@ -1290,6 +1316,12 @@
yield self.txn.commit()
self.txn = self.store.newTransaction()
+ # Need to know whether the attendee is a location or resource with auto-accept set
+ record = self.directoryService().recordWithGUID(attendee)
+ if record.autoSchedule:
+ # Log details about the event so we can have a human manually process
+ self.fixedAutoAccepts.append(details)
+
returnValue(True)
except Exception, e:
@@ -1376,6 +1408,24 @@
table.printTable(os=self.output)
+ def printAutoAccepts(self):
+ # Print summary of results
+ table = tables.Table()
+ table.addHeader(("Path", "RID", "UID", "Start Time", "Title"))
+ for item in sorted(self.fixedAutoAccepts, key=lambda x:x["path"]):
+ table.addRow((
+ item["path"],
+ item["rid"],
+ item["uid"],
+ item["start"],
+ item["title"],
+ ))
+
+ self.output.write("\n")
+ self.output.write("Auto-Accept Fixes:\n")
+ table.printTable(os=self.output)
+
+
@inlineCallbacks
def getCalendar(self, resid, doFix=False):
co = schema.CALENDAR_OBJECT
Added: CalendarServer/trunk/calendarserver/tools/test/calverify/augments.xml
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/calverify/augments.xml (rev 0)
+++ CalendarServer/trunk/calendarserver/tools/test/calverify/augments.xml 2012-05-09 03:19:37 UTC (rev 9236)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+Copyright (c) 2012 Apple Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ -->
+
+<!DOCTYPE accounts SYSTEM "../../../conf/auth/augments.dtd">
+
+<augments>
+ <record>
+ <uid>Default</uid>
+ <enable>true</enable>
+ <enable-calendar>true</enable-calendar>
+ </record>
+ <record>
+ <uid>75EA36BE-F71B-40F9-81F9-CF59BF40CA8F</uid>
+ <enable>true</enable>
+ <enable-calendar>true</enable-calendar>
+ <auto-schedule>true</auto-schedule>
+ </record>
+</augments>
Modified: CalendarServer/trunk/calendarserver/tools/test/calverify/resources.xml
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/calverify/resources.xml 2012-05-08 22:09:08 UTC (rev 9235)
+++ CalendarServer/trunk/calendarserver/tools/test/calverify/resources.xml 2012-05-09 03:19:37 UTC (rev 9236)
@@ -1,4 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<accounts realm="/Search">
+ <location>
+ <uid>location01</uid>
+ <guid>75EA36BE-F71B-40F9-81F9-CF59BF40CA8F</guid>
+ <password>location01</password>
+ <name>Room 01</name>
+ </location>
</accounts>
Modified: CalendarServer/trunk/calendarserver/tools/test/test_calverify.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/test_calverify.py 2012-05-08 22:09:08 UTC (rev 9235)
+++ CalendarServer/trunk/calendarserver/tools/test/test_calverify.py 2012-05-09 03:19:37 UTC (rev 9236)
@@ -445,6 +445,7 @@
"verbose":False,
"uid":"",
"uuid":"",
+ "tzid":"",
}
output = StringIO()
calverify = CalVerifyService(self._sqlCalendarStore, options, output, reactor, config)
@@ -482,6 +483,7 @@
"verbose":False,
"uid":"",
"uuid":"",
+ "tzid":"",
}
output = StringIO()
@@ -532,6 +534,7 @@
"verbose":False,
"uid":"",
"uuid":"",
+ "tzid":"",
}
output = StringIO()
calverify = CalVerifyService(self._sqlCalendarStore, options, output, reactor, config)
@@ -566,6 +569,7 @@
"verbose":False,
"uid":"",
"uuid":"",
+ "tzid":"",
}
output = StringIO()
@@ -781,6 +785,7 @@
"verbose":False,
"uid":"",
"uuid":"",
+ "tzid":"",
}
calverifyNo64 = CalVerifyService(self._sqlCalendarStore, optionsNo64, StringIO(), reactor, config)
@@ -790,6 +795,7 @@
"verbose":False,
"uid":"",
"uuid":"",
+ "tzid":"",
}
calverify64 = CalVerifyService(self._sqlCalendarStore, options64, StringIO(), reactor, config)
@@ -814,9 +820,10 @@
"hasPrivateComment": False,
}
- uuid1 = "D46F3D71-04B7-43C2-A7B6-6F92F92E61D0"
- uuid2 = "47B16BB4-DB5F-4BF6-85FE-A7DA54230F92"
- uuid3 = "AC478592-7783-44D1-B2AE-52359B4E8415"
+ uuid1 = "D46F3D71-04B7-43C2-A7B6-6F92F92E61D0"
+ uuid2 = "47B16BB4-DB5F-4BF6-85FE-A7DA54230F92"
+ uuid3 = "AC478592-7783-44D1-B2AE-52359B4E8415"
+ uuidl1 = "75EA36BE-F71B-40F9-81F9-CF59BF40CA8F"
@inlineCallbacks
def setUp(self):
@@ -840,6 +847,11 @@
os.path.dirname(__file__), "calverify", "resources.xml"
)
)
+ self.patch(config.AugmentService.params, "xmlFiles",
+ [os.path.join(
+ os.path.dirname(__file__), "calverify", "augments.xml"
+ ),]
+ )
self.rootResource = getRootResource(config, self._sqlCalendarStore)
self.directory = self.rootResource.getDirectory()
@@ -1336,6 +1348,7 @@
"details":False,
"uid":"",
"uuid":"",
+ "tzid":"",
}
output = StringIO()
calverify = CalVerifyService(self._sqlCalendarStore, options, output, reactor, config)
@@ -1367,6 +1380,9 @@
self.assertTrue("Fix add event" not in calverify.results)
self.assertTrue("Fix add inbox" not in calverify.results)
self.assertTrue("Fix remove" not in calverify.results)
+ self.assertTrue("Fix remove" not in calverify.results)
+ self.assertTrue("Fix failures" not in calverify.results)
+ self.assertTrue("Fixed Auto-Accepts" not in calverify.results)
sync_token_new1 = (yield (yield self.calendarUnderTest(self.uuid1)).syncToken())
sync_token_new2 = (yield (yield self.calendarUnderTest(self.uuid2)).syncToken())
@@ -1397,6 +1413,7 @@
"details":False,
"uid":"",
"uuid":"",
+ "tzid":"",
}
output = StringIO()
calverify = CalVerifyService(self._sqlCalendarStore, options, output, reactor, config)
@@ -1463,6 +1480,9 @@
obj = yield self.calendarObjectUnderTest(self.uuid3, "calendar", "mismatched2_organizer.ics")
self.assertEqual(obj, None)
+ self.assertEqual(calverify.results["Fix failures"], 0)
+ self.assertEqual(calverify.results["Fixed Auto-Accepts"], [])
+
sync_token_new1 = (yield (yield self.calendarUnderTest(self.uuid1)).syncToken())
sync_token_new2 = (yield (yield self.calendarUnderTest(self.uuid2)).syncToken())
sync_token_new3 = (yield (yield self.calendarUnderTest(self.uuid3)).syncToken())
@@ -1483,3 +1503,246 @@
self.assertTrue("Fix add event" not in calverify.results)
self.assertTrue("Fix add inbox" not in calverify.results)
self.assertTrue("Fix remove" not in calverify.results)
+ self.assertTrue("Fix failures" not in calverify.results)
+ self.assertTrue("Fixed Auto-Accepts" not in calverify.results)
+
+class CalVerifyMismatchTestsAutoAccept(CalVerifyMismatchTestsBase):
+ """
+ Tests calverify for iCalendar mismatch problems for auto-accept attendees.
+ """
+
+ # Organizer has event, attendee do not
+ MISSING_ATTENDEE_1_ICS = """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Apple Inc.//iCal 4.0.1//EN
+CALSCALE:GREGORIAN
+BEGIN:VEVENT
+CREATED:20100303T181216Z
+UID:MISSING_ATTENDEE_ICS
+DTEND:20000307T151500Z
+TRANSP:OPAQUE
+SUMMARY:Ancient event
+DTSTART:20000307T111500Z
+DTSTAMP:20100303T181220Z
+SEQUENCE:2
+ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
+ATTENDEE:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
+ATTENDEE:urn:uuid:75EA36BE-F71B-40F9-81F9-CF59BF40CA8F
+END:VEVENT
+END:VCALENDAR
+""".replace("\n", "\r\n")
+
+ # Attendee has event, organizer does not
+ MISSING_ORGANIZER_L1_ICS = """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Apple Inc.//iCal 4.0.1//EN
+CALSCALE:GREGORIAN
+BEGIN:VEVENT
+CREATED:20100303T181216Z
+UID:MISSING_ORGANIZER_ICS
+DTEND:20000307T151500Z
+TRANSP:OPAQUE
+SUMMARY:Ancient event
+DTSTART:20000307T111500Z
+DTSTAMP:20100303T181220Z
+SEQUENCE:2
+ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
+ATTENDEE:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
+ATTENDEE:urn:uuid:75EA36BE-F71B-40F9-81F9-CF59BF40CA8F
+END:VEVENT
+END:VCALENDAR
+""".replace("\n", "\r\n")
+
+ # Attendee partstat mismatch
+ MISMATCH_ATTENDEE_1_ICS = """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Apple Inc.//iCal 4.0.1//EN
+CALSCALE:GREGORIAN
+BEGIN:VEVENT
+CREATED:20100303T181216Z
+UID:MISMATCH_ATTENDEE_ICS
+DTEND:20000307T151500Z
+TRANSP:OPAQUE
+SUMMARY:Ancient event
+DTSTART:20000307T111500Z
+DTSTAMP:20100303T181220Z
+SEQUENCE:2
+ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
+ATTENDEE;PARTSTAT=ACCEPTED:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
+ATTENDEE;PARTSTAT=NEEDS-ACTION:urn:uuid:75EA36BE-F71B-40F9-81F9-CF59BF40CA8F
+END:VEVENT
+END:VCALENDAR
+""".replace("\n", "\r\n")
+
+ MISMATCH_ATTENDEE_L1_ICS = """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Apple Inc.//iCal 4.0.1//EN
+CALSCALE:GREGORIAN
+BEGIN:VEVENT
+CREATED:20100303T181216Z
+UID:MISMATCH_ATTENDEE_ICS
+DTEND:20000307T151500Z
+TRANSP:OPAQUE
+SUMMARY:Ancient event
+DTSTART:20000307T111500Z
+DTSTAMP:20100303T181220Z
+SEQUENCE:2
+ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
+ATTENDEE;PARTSTAT=ACCEPTED:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
+ATTENDEE;PARTSTAT=ACCEPTED:urn:uuid:75EA36BE-F71B-40F9-81F9-CF59BF40CA8F
+END:VEVENT
+END:VCALENDAR
+""".replace("\n", "\r\n")
+
+
+ requirements = {
+ CalVerifyMismatchTestsBase.uuid1 : {
+ "calendar" : {
+ "missing_attendee.ics" : (MISSING_ATTENDEE_1_ICS, CalVerifyMismatchTestsBase.metadata,),
+ "mismatched_attendee.ics" : (MISMATCH_ATTENDEE_1_ICS, CalVerifyMismatchTestsBase.metadata,),
+ },
+ "inbox" : {},
+ },
+ CalVerifyMismatchTestsBase.uuid2 : {
+ "calendar" : {},
+ "inbox" : {},
+ },
+ CalVerifyMismatchTestsBase.uuid3 : {
+ "calendar" : {},
+ "inbox" : {},
+ },
+ CalVerifyMismatchTestsBase.uuidl1 : {
+ "calendar" : {
+ "mismatched_attendee.ics" : (MISMATCH_ATTENDEE_L1_ICS, CalVerifyMismatchTestsBase.metadata,),
+ },
+ "inbox" : {},
+ },
+ }
+
+ @inlineCallbacks
+ def test_scanMismatchOnly(self):
+ """
+ CalVerifyService.doScan without fix for mismatches. Make sure it detects
+ as much as it can. Make sure sync-token is not changed.
+ """
+
+ sync_token_old1 = (yield (yield self.calendarUnderTest(self.uuid1)).syncToken())
+ sync_token_oldl1 = (yield (yield self.calendarUnderTest(self.uuidl1)).syncToken())
+ self.commit()
+
+ options = {
+ "ical":False,
+ "badcua":False,
+ "mismatch":True,
+ "nobase64":False,
+ "verbose":False,
+ "details":False,
+ "uid":"",
+ "uuid":"",
+ "tzid":"",
+ }
+ output = StringIO()
+ calverify = CalVerifyService(self._sqlCalendarStore, options, output, reactor, config)
+ yield calverify.doScan(False, True, False, start=PyCalendarDateTime(2000, 1, 1, 0, 0, 0))
+
+ self.assertEqual(calverify.results["Number of events to process"], 3)
+ self.assertEqual(calverify.results["Missing Attendee"], set((
+ ("MISSING_ATTENDEE_ICS", self.uuid1, self.uuidl1,),
+ )))
+ self.assertEqual(calverify.results["Mismatch Attendee"], set((
+ ("MISMATCH_ATTENDEE_ICS", self.uuid1, self.uuidl1,),
+ )))
+ self.assertTrue("Missing Organizer" not in calverify.results)
+ self.assertTrue("Mismatch Organizer" not in calverify.results)
+
+ self.assertTrue("Fix change event" not in calverify.results)
+ self.assertTrue("Fix add event" not in calverify.results)
+ self.assertTrue("Fix add inbox" not in calverify.results)
+ self.assertTrue("Fix remove" not in calverify.results)
+ self.assertTrue("Fix failures" not in calverify.results)
+ self.assertTrue("Fixed Auto-Accepts" not in calverify.results)
+
+ sync_token_new1 = (yield (yield self.calendarUnderTest(self.uuid1)).syncToken())
+ sync_token_newl1 = (yield (yield self.calendarUnderTest(self.uuidl1)).syncToken())
+ self.assertEqual(sync_token_old1, sync_token_new1)
+ self.assertEqual(sync_token_oldl1, sync_token_newl1)
+
+
+ @inlineCallbacks
+ def test_fixMismatch(self):
+ """
+ CalVerifyService.doScan with fix for mismatches. Make sure it detects
+ and fixes as much as it can. Make sure sync-token is not changed.
+ """
+
+ sync_token_old1 = (yield (yield self.calendarUnderTest(self.uuid1)).syncToken())
+ sync_token_oldl1 = (yield (yield self.calendarUnderTest(self.uuidl1)).syncToken())
+ self.commit()
+
+ options = {
+ "ical":False,
+ "badcua":False,
+ "mismatch":True,
+ "nobase64":False,
+ "verbose":False,
+ "details":False,
+ "uid":"",
+ "uuid":"",
+ "tzid":"",
+ }
+ output = StringIO()
+ calverify = CalVerifyService(self._sqlCalendarStore, options, output, reactor, config)
+ yield calverify.doScan(False, True, True, start=PyCalendarDateTime(2000, 1, 1, 0, 0, 0))
+
+ self.assertEqual(calverify.results["Number of events to process"], 3)
+ self.assertEqual(calverify.results["Missing Attendee"], set((
+ ("MISSING_ATTENDEE_ICS", self.uuid1, self.uuidl1,),
+ )))
+ self.assertEqual(calverify.results["Mismatch Attendee"], set((
+ ("MISMATCH_ATTENDEE_ICS", self.uuid1, self.uuidl1,),
+ )))
+ self.assertTrue("Missing Organizer" not in calverify.results)
+ self.assertTrue("Mismatch Organizer" not in calverify.results)
+
+ self.assertEqual(calverify.results["Fix change event"], set((
+ (self.uuidl1, "calendar", "MISMATCH_ATTENDEE_ICS",),
+ )))
+
+ self.assertEqual(calverify.results["Fix add event"], set((
+ (self.uuidl1, "calendar", "MISSING_ATTENDEE_ICS",),
+ )))
+
+ self.assertEqual(calverify.results["Fix add inbox"], set((
+ (self.uuidl1, "MISSING_ATTENDEE_ICS",),
+ (self.uuidl1, "MISMATCH_ATTENDEE_ICS",),
+ )))
+
+ self.assertTrue("Fix remove" not in calverify.results)
+
+ self.assertEqual(calverify.results["Fix failures"], 0)
+ self.assertEqual(calverify.results["Fixed Auto-Accepts"][0]["path"], "/calendars/__uids__/%s/calendar/mismatched_attendee.ics" % self.uuidl1)
+ self.assertEqual(calverify.results["Fixed Auto-Accepts"][0]["uid"], "MISMATCH_ATTENDEE_ICS")
+ self.assertEqual(calverify.results["Fixed Auto-Accepts"][0]["start"].getText(), "20000307T031500")
+ self.assertEqual(calverify.results["Fixed Auto-Accepts"][1]["uid"], "MISSING_ATTENDEE_ICS")
+ self.assertEqual(calverify.results["Fixed Auto-Accepts"][1]["start"].getText(), "20000307T031500")
+
+ sync_token_new1 = (yield (yield self.calendarUnderTest(self.uuid1)).syncToken())
+ sync_token_newl1 = (yield (yield self.calendarUnderTest(self.uuidl1)).syncToken())
+ self.assertEqual(sync_token_old1, sync_token_new1)
+ self.assertNotEqual(sync_token_oldl1, sync_token_newl1)
+
+ # Re-scan after changes to make sure there are no errors
+ self.commit()
+ calverify = CalVerifyService(self._sqlCalendarStore, options, output, reactor, config)
+ yield calverify.doScan(False, True, False, start=PyCalendarDateTime(2000, 1, 1, 0, 0, 0))
+
+ self.assertEqual(calverify.results["Number of events to process"], 4)
+ self.assertTrue("Missing Attendee" not in calverify.results)
+ self.assertTrue("Mismatch Attendee" not in calverify.results)
+ self.assertTrue("Missing Organizer" not in calverify.results)
+ self.assertTrue("Mismatch Organizer" not in calverify.results)
+ self.assertTrue("Fix add event" not in calverify.results)
+ self.assertTrue("Fix add inbox" not in calverify.results)
+ self.assertTrue("Fix remove" not in calverify.results)
+ self.assertTrue("Fix failures" not in calverify.results)
+ self.assertTrue("Fixed Auto-Accepts" not in calverify.results)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120508/7a1f3e9d/attachment-0001.html>
More information about the calendarserver-changes
mailing list