<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[14343] CalendarServer/branches/release/CalendarServer-5.4-dev/txdav/caldav/datastore/scheduling</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.calendarserver.org//changeset/14343">14343</a></dd>
<dt>Author</dt> <dd>cdaboo@apple.com</dd>
<dt>Date</dt> <dd>2015-01-26 08:30:27 -0800 (Mon, 26 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fix iTIP REPLY processing for the case where the organizer's copy of the event has overrides in it that are not in the iTIP message.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServerbranchesreleaseCalendarServer54devtxdavcaldavdatastoreschedulingitippy">CalendarServer/branches/release/CalendarServer-5.4-dev/txdav/caldav/datastore/scheduling/itip.py</a></li>
<li><a href="#CalendarServerbranchesreleaseCalendarServer54devtxdavcaldavdatastoreschedulingtesttest_itippy">CalendarServer/branches/release/CalendarServer-5.4-dev/txdav/caldav/datastore/scheduling/test/test_itip.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServerbranchesreleaseCalendarServer54devtxdavcaldavdatastoreschedulingitippy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/release/CalendarServer-5.4-dev/txdav/caldav/datastore/scheduling/itip.py (14342 => 14343)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/release/CalendarServer-5.4-dev/txdav/caldav/datastore/scheduling/itip.py        2015-01-24 17:52:19 UTC (rev 14342)
+++ CalendarServer/branches/release/CalendarServer-5.4-dev/txdav/caldav/datastore/scheduling/itip.py        2015-01-26 16:30:27 UTC (rev 14343)
</span><span class="lines">@@ -348,6 +348,23 @@
</span><span class="cx">                 if partstat or private_comment:
</span><span class="cx">                     rids.add((&quot;&quot;, partstat, private_comment,))
</span><span class="cx"> 
</span><ins>+        # Make sure all overridden components in the organizer's copy have matching overridden components
+        # in the iTIP message
+        for organizer_component in calendar.subcomponents():
+            if organizer_component.name() == &quot;VTIMEZONE&quot;:
+                continue
+            rid = organizer_component.getRecurrenceIDUTC()
+            if rid is None:
+                continue
+            match_component = itip_message.overriddenComponent(rid)
+            if match_component is None:
+                match_component = itip_message.deriveInstance(rid)
+                if match_component is not None:
+                    itip_message.addComponent(match_component)
+                else:
+                    log.error(&quot;Ignoring instance: %s missing in iTIP REPLY for: %s&quot; % (rid, itip_message.resourceUID()))
+                    continue
+
</ins><span class="cx">         # Now do all overridden ones (sort by RECURRENCE-ID)
</span><span class="cx">         sortedComponents = []
</span><span class="cx">         for itip_component in itip_message.subcomponents():
</span></span></pre></div>
<a id="CalendarServerbranchesreleaseCalendarServer54devtxdavcaldavdatastoreschedulingtesttest_itippy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/release/CalendarServer-5.4-dev/txdav/caldav/datastore/scheduling/test/test_itip.py (14342 => 14343)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/release/CalendarServer-5.4-dev/txdav/caldav/datastore/scheduling/test/test_itip.py        2015-01-24 17:52:19 UTC (rev 14342)
+++ CalendarServer/branches/release/CalendarServer-5.4-dev/txdav/caldav/datastore/scheduling/test/test_itip.py        2015-01-26 16:30:27 UTC (rev 14343)
</span><span class="lines">@@ -34,29 +34,27 @@
</span><span class="cx">     iCalendar support tests
</span><span class="cx">     &quot;&quot;&quot;
</span><span class="cx"> 
</span><del>-    def test_processRequest_overrideOfEXDATE(self):
</del><ins>+    def test_processRequest(self):
</ins><span class="cx">         &quot;&quot;&quot;
</span><del>-        Test iTIPProcessing.processRequest properly removes an EXDATE when an override is added
</del><ins>+        Test iTIPProcessing.processRequest works properly for various scenarios.
</ins><span class="cx">         &quot;&quot;&quot;
</span><span class="cx"> 
</span><span class="cx">         data = (
</span><span class="cx">             (
</span><del>-                &quot;1.1 Single single-value EXDATE&quot;,
</del><ins>+                &quot;1.1 Attendee added to master after appearing on override only&quot;,
</ins><span class="cx">                 &quot;&quot;&quot;BEGIN:VCALENDAR
</span><span class="cx"> VERSION:2.0
</span><span class="cx"> PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
</span><span class="cx"> BEGIN:VEVENT
</span><span class="cx"> UID:12345-67890-1
</span><del>-DTSTART:20071114T000000Z
</del><ins>+RECURRENCE-ID:20071114T000000Z
+DTSTART:20071114T010000Z
</ins><span class="cx"> DURATION:PT1H
</span><span class="cx"> DTSTAMP:20071114T000000Z
</span><span class="cx"> ATTENDEE:mailto:user01@example.com
</span><del>-ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
</del><ins>+ATTENDEE:mailto:user02@example.com
</ins><span class="cx"> ORGANIZER:mailto:user01@example.com
</span><del>-RRULE:FREQ=DAILY
-EXDATE:20071115T000000Z
-SUMMARY:Test
-TRANSP:TRANSPARENT
</del><ins>+SUMMARY:Test - override
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> &quot;&quot;&quot;,
</span><span class="lines">@@ -66,254 +64,58 @@
</span><span class="cx"> METHOD:REQUEST
</span><span class="cx"> BEGIN:VEVENT
</span><span class="cx"> UID:12345-67890-1
</span><del>-RECURRENCE-ID:20071115T000000Z
-DTSTART:20071115T000000Z
</del><ins>+DTSTART:20071113T000000Z
</ins><span class="cx"> DURATION:PT1H
</span><span class="cx"> DTSTAMP:20071114T000000Z
</span><span class="cx"> ATTENDEE:mailto:user01@example.com
</span><span class="cx"> ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
</span><span class="cx"> ORGANIZER:mailto:user01@example.com
</span><del>-SUMMARY:Test1
-END:VEVENT
-END:VCALENDAR
-&quot;&quot;&quot;,
-                &quot;&quot;&quot;BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-BEGIN:VEVENT
-UID:12345-67890-1
-DTSTART:20071114T000000Z
-DURATION:PT1H
-DTSTAMP:20071114T000000Z
-ATTENDEE:mailto:user01@example.com
-ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
-ORGANIZER:mailto:user01@example.com
</del><span class="cx"> RRULE:FREQ=DAILY
</span><span class="cx"> SUMMARY:Test
</span><del>-TRANSP:TRANSPARENT
</del><span class="cx"> END:VEVENT
</span><span class="cx"> BEGIN:VEVENT
</span><span class="cx"> UID:12345-67890-1
</span><del>-RECURRENCE-ID:20071115T000000Z
-DTSTART:20071115T000000Z
</del><ins>+RECURRENCE-ID:20071114T000000Z
+DTSTART:20071114T010000Z
</ins><span class="cx"> DURATION:PT1H
</span><span class="cx"> DTSTAMP:20071114T000000Z
</span><span class="cx"> ATTENDEE:mailto:user01@example.com
</span><span class="cx"> ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
</span><span class="cx"> ORGANIZER:mailto:user01@example.com
</span><del>-SUMMARY:Test1
-TRANSP:TRANSPARENT
</del><ins>+SUMMARY:Test - override
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> &quot;&quot;&quot;,
</span><del>-            ),
-            (
-                &quot;1.2 Single multi-value EXDATE&quot;,
</del><span class="cx">                 &quot;&quot;&quot;BEGIN:VCALENDAR
</span><span class="cx"> VERSION:2.0
</span><span class="cx"> PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
</span><span class="cx"> BEGIN:VEVENT
</span><span class="cx"> UID:12345-67890-1
</span><del>-DTSTART:20071114T000000Z
</del><ins>+DTSTART:20071113T000000Z
</ins><span class="cx"> DURATION:PT1H
</span><span class="cx"> DTSTAMP:20071114T000000Z
</span><span class="cx"> ATTENDEE:mailto:user01@example.com
</span><span class="cx"> ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
</span><span class="cx"> ORGANIZER:mailto:user01@example.com
</span><span class="cx"> RRULE:FREQ=DAILY
</span><del>-EXDATE:20071115T000000Z,20071116T000000Z
</del><span class="cx"> SUMMARY:Test
</span><span class="cx"> TRANSP:TRANSPARENT
</span><span class="cx"> END:VEVENT
</span><del>-END:VCALENDAR
-&quot;&quot;&quot;,
-                &quot;&quot;&quot;BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-METHOD:REQUEST
</del><span class="cx"> BEGIN:VEVENT
</span><span class="cx"> UID:12345-67890-1
</span><del>-RECURRENCE-ID:20071115T000000Z
-DTSTART:20071115T000000Z
</del><ins>+RECURRENCE-ID:20071114T000000Z
+DTSTART:20071114T010000Z
</ins><span class="cx"> DURATION:PT1H
</span><span class="cx"> DTSTAMP:20071114T000000Z
</span><span class="cx"> ATTENDEE:mailto:user01@example.com
</span><span class="cx"> ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
</span><span class="cx"> ORGANIZER:mailto:user01@example.com
</span><del>-SUMMARY:Test1
-END:VEVENT
-END:VCALENDAR
-&quot;&quot;&quot;,
-                &quot;&quot;&quot;BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-BEGIN:VEVENT
-UID:12345-67890-1
-DTSTART:20071114T000000Z
-DURATION:PT1H
-DTSTAMP:20071114T000000Z
-ATTENDEE:mailto:user01@example.com
-ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
-ORGANIZER:mailto:user01@example.com
-RRULE:FREQ=DAILY
-EXDATE:20071116T000000Z
-SUMMARY:Test
</del><ins>+SUMMARY:Test - override
</ins><span class="cx"> TRANSP:TRANSPARENT
</span><span class="cx"> END:VEVENT
</span><del>-BEGIN:VEVENT
-UID:12345-67890-1
-RECURRENCE-ID:20071115T000000Z
-DTSTART:20071115T000000Z
-DURATION:PT1H
-DTSTAMP:20071114T000000Z
-ATTENDEE:mailto:user01@example.com
-ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
-ORGANIZER:mailto:user01@example.com
-SUMMARY:Test1
-TRANSP:TRANSPARENT
-END:VEVENT
</del><span class="cx"> END:VCALENDAR
</span><span class="cx"> &quot;&quot;&quot;,
</span><span class="cx">             ),
</span><del>-            (
-                &quot;1.3 Multiple single-value EXDATEs&quot;,
-                &quot;&quot;&quot;BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-BEGIN:VEVENT
-UID:12345-67890-1
-DTSTART:20071114T000000Z
-DURATION:PT1H
-DTSTAMP:20071114T000000Z
-ATTENDEE:mailto:user01@example.com
-ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
-ORGANIZER:mailto:user01@example.com
-RRULE:FREQ=DAILY
-EXDATE:20071115T000000Z
-EXDATE:20071116T000000Z
-SUMMARY:Test
-TRANSP:TRANSPARENT
-END:VEVENT
-END:VCALENDAR
-&quot;&quot;&quot;,
-                &quot;&quot;&quot;BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-METHOD:REQUEST
-BEGIN:VEVENT
-UID:12345-67890-1
-RECURRENCE-ID:20071115T000000Z
-DTSTART:20071115T000000Z
-DURATION:PT1H
-DTSTAMP:20071114T000000Z
-ATTENDEE:mailto:user01@example.com
-ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
-ORGANIZER:mailto:user01@example.com
-SUMMARY:Test1
-END:VEVENT
-END:VCALENDAR
-&quot;&quot;&quot;,
-                &quot;&quot;&quot;BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-BEGIN:VEVENT
-UID:12345-67890-1
-DTSTART:20071114T000000Z
-DURATION:PT1H
-DTSTAMP:20071114T000000Z
-ATTENDEE:mailto:user01@example.com
-ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
-ORGANIZER:mailto:user01@example.com
-RRULE:FREQ=DAILY
-EXDATE:20071116T000000Z
-SUMMARY:Test
-TRANSP:TRANSPARENT
-END:VEVENT
-BEGIN:VEVENT
-UID:12345-67890-1
-RECURRENCE-ID:20071115T000000Z
-DTSTART:20071115T000000Z
-DURATION:PT1H
-DTSTAMP:20071114T000000Z
-ATTENDEE:mailto:user01@example.com
-ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
-ORGANIZER:mailto:user01@example.com
-SUMMARY:Test1
-TRANSP:TRANSPARENT
-END:VEVENT
-END:VCALENDAR
-&quot;&quot;&quot;,
-            ),
-            (
-                &quot;1.4 Multiple single- and multi-value EXDATEs&quot;,
-                &quot;&quot;&quot;BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-BEGIN:VEVENT
-UID:12345-67890-1
-DTSTART:20071114T000000Z
-DURATION:PT1H
-DTSTAMP:20071114T000000Z
-ATTENDEE:mailto:user01@example.com
-ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
-ORGANIZER:mailto:user01@example.com
-RRULE:FREQ=DAILY
-EXDATE:20071115T000000Z,20071116T000000Z
-EXDATE:20071117T000000Z
-SUMMARY:Test
-TRANSP:TRANSPARENT
-END:VEVENT
-END:VCALENDAR
-&quot;&quot;&quot;,
-                &quot;&quot;&quot;BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-METHOD:REQUEST
-BEGIN:VEVENT
-UID:12345-67890-1
-RECURRENCE-ID:20071115T000000Z
-DTSTART:20071115T000000Z
-DURATION:PT1H
-DTSTAMP:20071114T000000Z
-ATTENDEE:mailto:user01@example.com
-ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
-ORGANIZER:mailto:user01@example.com
-SUMMARY:Test1
-END:VEVENT
-END:VCALENDAR
-&quot;&quot;&quot;,
-                &quot;&quot;&quot;BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-BEGIN:VEVENT
-UID:12345-67890-1
-DTSTART:20071114T000000Z
-DURATION:PT1H
-DTSTAMP:20071114T000000Z
-ATTENDEE:mailto:user01@example.com
-ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
-ORGANIZER:mailto:user01@example.com
-RRULE:FREQ=DAILY
-EXDATE:20071116T000000Z
-EXDATE:20071117T000000Z
-SUMMARY:Test
-TRANSP:TRANSPARENT
-END:VEVENT
-BEGIN:VEVENT
-UID:12345-67890-1
-RECURRENCE-ID:20071115T000000Z
-DTSTART:20071115T000000Z
-DURATION:PT1H
-DTSTAMP:20071114T000000Z
-ATTENDEE:mailto:user01@example.com
-ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
-ORGANIZER:mailto:user01@example.com
-SUMMARY:Test1
-TRANSP:TRANSPARENT
-END:VEVENT
-END:VCALENDAR
-&quot;&quot;&quot;,
-            ),
</del><span class="cx">         )
</span><span class="cx"> 
</span><span class="cx">         for title, calendar_txt, itip_txt, changed_txt in data:
</span><span class="lines">@@ -321,214 +123,11 @@
</span><span class="cx">             itip = Component.fromString(itip_txt)
</span><span class="cx">             changed = Component.fromString(changed_txt)
</span><span class="cx"> 
</span><del>-            result, _ignore = iTipProcessing.processRequest(itip, calendar, &quot;mailto:user02@example.com&quot;)
</del><ins>+            result, rids = iTipProcessing.processRequest(itip, calendar, &quot;mailto:user02@example.com&quot;)
+            self.assertEqual(len(rids), 0)
</ins><span class="cx">             self.assertEqual(result, changed, msg=&quot;Calendar mismatch: %s&quot; % (title,))
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-    def test_processReply(self):
-        &quot;&quot;&quot;
-        Test iTIPProcessing.processReply
-        &quot;&quot;&quot;
-
-        data = (
-            (
-                &quot;1.1 Simple Reply - non recurring&quot;,
-                &quot;&quot;&quot;BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-BEGIN:VEVENT
-UID:12345-67890-1
-DTSTART:20071114T000000Z
-DTSTAMP:20071114T000000Z
-ORGANIZER:mailto:user01@example.com
-ATTENDEE:mailto:user01@example.com
-ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
-END:VEVENT
-END:VCALENDAR
-&quot;&quot;&quot;,
-                &quot;&quot;&quot;BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-METHOD:REPLY
-BEGIN:VEVENT
-UID:12345-67890-1
-DTSTART:20071115T000000Z
-DTSTAMP:20071114T000000Z
-ORGANIZER:mailto:user01@example.com
-ATTENDEE;PARTSTAT=ACCEPTED:mailto:user02@example.com
-END:VEVENT
-END:VCALENDAR
-&quot;&quot;&quot;,
-                &quot;&quot;&quot;BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-BEGIN:VEVENT
-UID:12345-67890-1
-DTSTART:20071114T000000Z
-DTSTAMP:20071114T000000Z
-ORGANIZER:mailto:user01@example.com
-ATTENDEE:mailto:user01@example.com
-ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.0:mailto:user02@example.com
-END:VEVENT
-END:VCALENDAR
-&quot;&quot;&quot;,
-                True,
-            ),
-            (
-                &quot;1.2 Simple Reply - recurring no overrides&quot;,
-                &quot;&quot;&quot;BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-BEGIN:VEVENT
-UID:12345-67890-1
-DTSTART:20071114T000000Z
-DTSTAMP:20071114T000000Z
-ORGANIZER:mailto:user01@example.com
-ATTENDEE:mailto:user01@example.com
-ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
-RRULE:FREQ=DAILY
-END:VEVENT
-END:VCALENDAR
-&quot;&quot;&quot;,
-                &quot;&quot;&quot;BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-METHOD:REPLY
-BEGIN:VEVENT
-UID:12345-67890-1
-DTSTART:20071115T000000Z
-DTSTAMP:20071114T000000Z
-ORGANIZER:mailto:user01@example.com
-ATTENDEE;PARTSTAT=ACCEPTED:mailto:user02@example.com
-RRULE:FREQ=DAILY
-END:VEVENT
-END:VCALENDAR
-&quot;&quot;&quot;,
-                &quot;&quot;&quot;BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-BEGIN:VEVENT
-UID:12345-67890-1
-DTSTART:20071114T000000Z
-DTSTAMP:20071114T000000Z
-ORGANIZER:mailto:user01@example.com
-ATTENDEE:mailto:user01@example.com
-ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.0:mailto:user02@example.com
-RRULE:FREQ=DAILY
-END:VEVENT
-END:VCALENDAR
-&quot;&quot;&quot;,
-                True,
-            ),
-            (
-                &quot;1.3 Simple Reply - recurring with missing master&quot;,
-                &quot;&quot;&quot;BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-BEGIN:VEVENT
-UID:12345-67890-1
-RECURRENCE-ID:20071114T000000Z
-DTSTART:20071114T000000Z
-DTSTAMP:20071114T000000Z
-ORGANIZER:mailto:user01@example.com
-ATTENDEE:mailto:user01@example.com
-ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
-END:VEVENT
-END:VCALENDAR
-&quot;&quot;&quot;,
-                &quot;&quot;&quot;BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-METHOD:REPLY
-BEGIN:VEVENT
-UID:12345-67890-1
-DTSTART:20071115T000000Z
-DTSTAMP:20071114T000000Z
-ORGANIZER:mailto:user01@example.com
-ATTENDEE;PARTSTAT=ACCEPTED:mailto:user02@example.com
-RRULE:FREQ=DAILY
-END:VEVENT
-BEGIN:VEVENT
-UID:12345-67890-1
-RECURRENCE-ID:20071114T000000Z
-DTSTART:20071115T000000Z
-DTSTAMP:20071114T000000Z
-ORGANIZER:mailto:user01@example.com
-ATTENDEE;PARTSTAT=ACCEPTED:mailto:user02@example.com
-END:VEVENT
-END:VCALENDAR
-&quot;&quot;&quot;,
-                &quot;&quot;&quot;BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-BEGIN:VEVENT
-UID:12345-67890-1
-RECURRENCE-ID:20071114T000000Z
-DTSTART:20071114T000000Z
-DTSTAMP:20071114T000000Z
-ORGANIZER:mailto:user01@example.com
-ATTENDEE:mailto:user01@example.com
-ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.0:mailto:user02@example.com
-END:VEVENT
-END:VCALENDAR
-&quot;&quot;&quot;,
-                True,
-            ),
-            (
-                &quot;1.4 Simple Reply - recurring with missing master, invalid override&quot;,
-                &quot;&quot;&quot;BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-BEGIN:VEVENT
-UID:12345-67890-1
-RECURRENCE-ID:20071114T000000Z
-DTSTART:20071114T000000Z
-DTSTAMP:20071114T000000Z
-ORGANIZER:mailto:user01@example.com
-ATTENDEE:mailto:user01@example.com
-ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
-END:VEVENT
-END:VCALENDAR
-&quot;&quot;&quot;,
-                &quot;&quot;&quot;BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-METHOD:REPLY
-BEGIN:VEVENT
-UID:12345-67890-1
-DTSTART:20071114T000000Z
-DTSTAMP:20071114T000000Z
-ORGANIZER:mailto:user01@example.com
-ATTENDEE;PARTSTAT=ACCEPTED:mailto:user02@example.com
-RRULE:FREQ=DAILY
-END:VEVENT
-BEGIN:VEVENT
-UID:12345-67890-1
-RECURRENCE-ID:20071115T000000Z
-DTSTART:20071115T000000Z
-DTSTAMP:20071114T000000Z
-ORGANIZER:mailto:user01@example.com
-ATTENDEE;PARTSTAT=ACCEPTED:mailto:user02@example.com
-END:VEVENT
-END:VCALENDAR
-&quot;&quot;&quot;,
-                None,
-                False,
-            ),
-        )
-
-        for title, calendar_txt, itip_txt, changed_txt, expected in data:
-            calendar = Component.fromString(calendar_txt)
-            itip = Component.fromString(itip_txt)
-            if expected:
-                changed = Component.fromString(changed_txt)
-
-            result, _ignore = iTipProcessing.processReply(itip, calendar)
-            self.assertEqual(result, expected, msg=&quot;Result mismatch: %s&quot; % (title,))
-            if expected:
-                self.assertEqual(changed, calendar, msg=&quot;Calendar mismatch: %s&quot; % (title,))
-
-
</del><span class="cx">     def test_processRequest_scheduleAgentChange(self):
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         Test iTIPProcessing.processRequest properly replaces a SCHEDULE-AGENT=CLIENT component with a
</span><span class="lines">@@ -1173,6 +772,370 @@
</span><span class="cx">             self.assertEqual(result, changed, msg=&quot;Calendar mismatch: %s&quot; % (title,))
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+    def test_processReply(self):
+        &quot;&quot;&quot;
+        Test iTIPProcessing.processReply
+        &quot;&quot;&quot;
+
+        data = (
+            (
+                &quot;1.1 Simple Reply - non recurring&quot;,
+                &quot;&quot;&quot;BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890-1
+DTSTART:20071114T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
+END:VEVENT
+END:VCALENDAR
+&quot;&quot;&quot;,
+                &quot;&quot;&quot;BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+METHOD:REPLY
+BEGIN:VEVENT
+UID:12345-67890-1
+DTSTART:20071115T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE;PARTSTAT=ACCEPTED:mailto:user02@example.com
+END:VEVENT
+END:VCALENDAR
+&quot;&quot;&quot;,
+                &quot;&quot;&quot;BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890-1
+DTSTART:20071114T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.0:mailto:user02@example.com
+END:VEVENT
+END:VCALENDAR
+&quot;&quot;&quot;,
+                True,
+            ),
+            (
+                &quot;1.2 Simple Reply - recurring no overrides&quot;,
+                &quot;&quot;&quot;BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890-1
+DTSTART:20071114T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+END:VCALENDAR
+&quot;&quot;&quot;,
+                &quot;&quot;&quot;BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+METHOD:REPLY
+BEGIN:VEVENT
+UID:12345-67890-1
+DTSTART:20071115T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE;PARTSTAT=ACCEPTED:mailto:user02@example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+END:VCALENDAR
+&quot;&quot;&quot;,
+                &quot;&quot;&quot;BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890-1
+DTSTART:20071114T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.0:mailto:user02@example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+END:VCALENDAR
+&quot;&quot;&quot;,
+                True,
+            ),
+            (
+                &quot;1.3 Simple Reply - recurring with missing master&quot;,
+                &quot;&quot;&quot;BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890-1
+RECURRENCE-ID:20071114T000000Z
+DTSTART:20071114T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
+END:VEVENT
+END:VCALENDAR
+&quot;&quot;&quot;,
+                &quot;&quot;&quot;BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+METHOD:REPLY
+BEGIN:VEVENT
+UID:12345-67890-1
+DTSTART:20071115T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE;PARTSTAT=ACCEPTED:mailto:user02@example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:VEVENT
+UID:12345-67890-1
+RECURRENCE-ID:20071114T000000Z
+DTSTART:20071115T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE;PARTSTAT=ACCEPTED:mailto:user02@example.com
+END:VEVENT
+END:VCALENDAR
+&quot;&quot;&quot;,
+                &quot;&quot;&quot;BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890-1
+RECURRENCE-ID:20071114T000000Z
+DTSTART:20071114T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.0:mailto:user02@example.com
+END:VEVENT
+END:VCALENDAR
+&quot;&quot;&quot;,
+                True,
+            ),
+            (
+                &quot;1.4 Simple Reply - recurring with overrides in master but not reply&quot;,
+                &quot;&quot;&quot;BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890-1
+DTSTART:20071114T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:VEVENT
+UID:12345-67890-1
+RECURRENCE-ID:20071114T000000Z
+DTSTART:20071114T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
+END:VEVENT
+END:VCALENDAR
+&quot;&quot;&quot;,
+                &quot;&quot;&quot;BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+METHOD:REPLY
+BEGIN:VEVENT
+UID:12345-67890-1
+DTSTART:20071114T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE;PARTSTAT=ACCEPTED:mailto:user02@example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+END:VCALENDAR
+&quot;&quot;&quot;,
+                &quot;&quot;&quot;BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890-1
+DTSTART:20071114T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.0:mailto:user02@example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:VEVENT
+UID:12345-67890-1
+RECURRENCE-ID:20071114T000000Z
+DTSTART:20071114T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.0:mailto:user02@example.com
+END:VEVENT
+END:VCALENDAR
+&quot;&quot;&quot;,
+                True,
+            ),
+            (
+                &quot;1.5 Simple Reply - recurring with overrides in master invalid in reply&quot;,
+                &quot;&quot;&quot;BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890-1
+DTSTART:20071114T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
+RRULE:FREQ=DAILY;COUNT=3
+END:VEVENT
+BEGIN:VEVENT
+UID:12345-67890-1
+RECURRENCE-ID:20071116T000000Z
+DTSTART:20071116T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
+END:VEVENT
+END:VCALENDAR
+&quot;&quot;&quot;,
+                &quot;&quot;&quot;BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+METHOD:REPLY
+BEGIN:VEVENT
+UID:12345-67890-1
+DTSTART:20071114T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE;PARTSTAT=ACCEPTED:mailto:user02@example.com
+RRULE:FREQ=DAILY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+&quot;&quot;&quot;,
+                &quot;&quot;&quot;BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890-1
+DTSTART:20071114T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.0:mailto:user02@example.com
+RRULE:FREQ=DAILY;COUNT=3
+END:VEVENT
+BEGIN:VEVENT
+UID:12345-67890-1
+RECURRENCE-ID:20071116T000000Z
+DTSTART:20071116T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
+END:VEVENT
+END:VCALENDAR
+&quot;&quot;&quot;,
+                True,
+            ),
+            (
+                &quot;1.6 Simple Reply - recurring with overrides in master, invalid ones in reply&quot;,
+                &quot;&quot;&quot;BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890-1
+DTSTART:20071114T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
+RRULE:FREQ=DAILY;COUNT=2
+END:VEVENT
+BEGIN:VEVENT
+UID:12345-67890-1
+RECURRENCE-ID:20071115T000000Z
+DTSTART:20071115T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:user02@example.com
+END:VEVENT
+END:VCALENDAR
+&quot;&quot;&quot;,
+                &quot;&quot;&quot;BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+METHOD:REPLY
+BEGIN:VEVENT
+UID:12345-67890-1
+DTSTART:20071114T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE;PARTSTAT=ACCEPTED:mailto:user02@example.com
+RRULE:FREQ=DAILY;COUNT=3
+END:VEVENT
+BEGIN:VEVENT
+UID:12345-67890-1
+RECURRENCE-ID:20071116T000000Z
+DTSTART:20071116T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE;PARTSTAT=ACCEPTED:mailto:user02@example.com
+END:VEVENT
+END:VCALENDAR
+&quot;&quot;&quot;,
+                &quot;&quot;&quot;BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890-1
+DTSTART:20071114T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.0:mailto:user02@example.com
+RRULE:FREQ=DAILY;COUNT=2
+END:VEVENT
+BEGIN:VEVENT
+UID:12345-67890-1
+RECURRENCE-ID:20071115T000000Z
+DTSTART:20071115T000000Z
+DTSTAMP:20071114T000000Z
+ORGANIZER:mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.0:mailto:user02@example.com
+END:VEVENT
+END:VCALENDAR
+&quot;&quot;&quot;,
+                True,
+            ),
+        )
+
+        for title, calendar_txt, itip_txt, changed_txt, expected in data:
+            calendar = Component.fromString(calendar_txt)
+            itip = Component.fromString(itip_txt)
+            if expected:
+                changed = Component.fromString(changed_txt)
+
+            result, _ignore = iTipProcessing.processReply(itip, calendar)
+            self.assertEqual(result, expected, msg=&quot;Result mismatch: %s&quot; % (title,))
+            if expected:
+                self.assertEqual(changed, calendar, msg=&quot;Calendar mismatch: %s&quot; % (title,))
+
+
</ins><span class="cx">     def test_update_attendee_partstat(self):
</span><span class="cx"> 
</span><span class="cx">         data = (
</span></span></pre>
</div>
</div>

</body>
</html>