[CalendarServer-changes] [15196] CalendarServer/branches/release/CalendarServer-5.4-dev/txdav/caldav /datastore/scheduling/imip
source_changes at macosforge.org
source_changes at macosforge.org
Tue Oct 20 10:21:19 PDT 2015
Revision: 15196
http://trac.calendarserver.org//changeset/15196
Author: sagen at apple.com
Date: 2015-10-20 10:21:19 -0700 (Tue, 20 Oct 2015)
Log Message:
-----------
Convert imip reply METHOD property values to uppercase
Modified Paths:
--------------
CalendarServer/branches/release/CalendarServer-5.4-dev/txdav/caldav/datastore/scheduling/imip/inbound.py
CalendarServer/branches/release/CalendarServer-5.4-dev/txdav/caldav/datastore/scheduling/imip/test/test_inbound.py
Modified: CalendarServer/branches/release/CalendarServer-5.4-dev/txdav/caldav/datastore/scheduling/imip/inbound.py
===================================================================
--- CalendarServer/branches/release/CalendarServer-5.4-dev/txdav/caldav/datastore/scheduling/imip/inbound.py 2015-10-15 21:24:09 UTC (rev 15195)
+++ CalendarServer/branches/release/CalendarServer-5.4-dev/txdav/caldav/datastore/scheduling/imip/inbound.py 2015-10-20 17:21:19 UTC (rev 15196)
@@ -194,6 +194,8 @@
# For METHOD:REPLY we can remove STATUS properties
methodProperty = calendar.getProperty("METHOD")
if methodProperty is not None:
+ # Uppercase any METHOD properties
+ methodProperty.setValue(methodProperty.value().upper())
if methodProperty.value() == "REPLY":
calendar.removeAllPropertiesWithName("STATUS")
Modified: CalendarServer/branches/release/CalendarServer-5.4-dev/txdav/caldav/datastore/scheduling/imip/test/test_inbound.py
===================================================================
--- CalendarServer/branches/release/CalendarServer-5.4-dev/txdav/caldav/datastore/scheduling/imip/test/test_inbound.py 2015-10-15 21:24:09 UTC (rev 15195)
+++ CalendarServer/branches/release/CalendarServer-5.4-dev/txdav/caldav/datastore/scheduling/imip/test/test_inbound.py 2015-10-20 17:21:19 UTC (rev 15196)
@@ -481,7 +481,7 @@
data = """BEGIN:VCALENDAR
VERSION:2.0
-METHOD:REPLY
+METHOD:Reply
BEGIN:VEVENT
UID:12345-67890
DTSTAMP:20130208T120000Z
@@ -496,7 +496,11 @@
calendar = Component.fromString(data)
self.assertFalse(calendar.hasProperty("PRODID"))
self.assertTrue(calendar.masterComponent().hasProperty("STATUS"))
+ prop = calendar.getProperty("METHOD")
+ self.assertEquals(prop.value(), "Reply")
sanitizeCalendar(calendar)
+ prop = calendar.getProperty("METHOD")
+ self.assertEquals(prop.value(), "REPLY")
self.assertTrue(calendar.hasProperty("PRODID"))
self.assertFalse(calendar.masterComponent().hasProperty("STATUS"))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20151020/3bf934d1/attachment.html>
More information about the calendarserver-changes
mailing list