[CalendarServer-changes] [15197] CalendarServer/trunk/txdav/caldav/datastore/scheduling/imip
source_changes at macosforge.org
source_changes at macosforge.org
Tue Oct 20 10:33:31 PDT 2015
Revision: 15197
http://trac.calendarserver.org//changeset/15197
Author: sagen at apple.com
Date: 2015-10-20 10:33:31 -0700 (Tue, 20 Oct 2015)
Log Message:
-----------
Convert imip reply METHOD property values to uppercase
Modified Paths:
--------------
CalendarServer/trunk/txdav/caldav/datastore/scheduling/imip/inbound.py
CalendarServer/trunk/txdav/caldav/datastore/scheduling/imip/test/test_inbound.py
Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/imip/inbound.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/imip/inbound.py 2015-10-20 17:21:19 UTC (rev 15196)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/imip/inbound.py 2015-10-20 17:33:31 UTC (rev 15197)
@@ -207,6 +207,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/trunk/txdav/caldav/datastore/scheduling/imip/test/test_inbound.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/imip/test/test_inbound.py 2015-10-20 17:21:19 UTC (rev 15196)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/imip/test/test_inbound.py 2015-10-20 17:33:31 UTC (rev 15197)
@@ -492,7 +492,7 @@
data = """BEGIN:VCALENDAR
VERSION:2.0
-METHOD:REPLY
+METHOD:Reply
BEGIN:VEVENT
UID:12345-67890
DTSTAMP:20130208T120000Z
@@ -508,7 +508,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/2b568e3c/attachment.html>
More information about the calendarserver-changes
mailing list