<!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>[15088] CalendarServer/branches/release/CalendarServer-5.4-dev/calendarserver/tools</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/15088">15088</a></dd>
<dt>Author</dt> <dd>cdaboo@apple.com</dd>
<dt>Date</dt> <dd>2015-09-02 10:08:13 -0700 (Wed, 02 Sep 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Latest missing location fix logic.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServerbranchesreleaseCalendarServer54devcalendarservertoolscalverifypy">CalendarServer/branches/release/CalendarServer-5.4-dev/calendarserver/tools/calverify.py</a></li>
<li><a href="#CalendarServerbranchesreleaseCalendarServer54devcalendarservertoolstestcalverifyresourcesxml">CalendarServer/branches/release/CalendarServer-5.4-dev/calendarserver/tools/test/calverify/resources.xml</a></li>
<li><a href="#CalendarServerbranchesreleaseCalendarServer54devcalendarservertoolstesttest_calverifypy">CalendarServer/branches/release/CalendarServer-5.4-dev/calendarserver/tools/test/test_calverify.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServerbranchesreleaseCalendarServer54devcalendarservertoolscalverifypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/release/CalendarServer-5.4-dev/calendarserver/tools/calverify.py (15087 => 15088)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/release/CalendarServer-5.4-dev/calendarserver/tools/calverify.py        2015-09-02 17:06:55 UTC (rev 15087)
+++ CalendarServer/branches/release/CalendarServer-5.4-dev/calendarserver/tools/calverify.py        2015-09-02 17:08:13 UTC (rev 15088)
</span><span class="lines">@@ -2830,6 +2830,7 @@
</span><span class="cx">         details = []
</span><span class="cx">         fixed = 0
</span><span class="cx">         rjust = 10
</span><ins>+        cuaddr = &quot;urn:uuid:{}&quot;.format(uuid)
</ins><span class="cx">         for resid in rows:
</span><span class="cx">             resid = resid[1]
</span><span class="cx">             caldata = yield self.getCalendar(resid, self.fix)
</span><span class="lines">@@ -2847,18 +2848,26 @@
</span><span class="cx">                 for comp in cal.subcomponents():
</span><span class="cx">                     if comp.name() != &quot;VEVENT&quot;:
</span><span class="cx">                         continue
</span><ins>+
+                    # Look for matching location property
</ins><span class="cx">                     location = comp.propertyValue(&quot;LOCATION&quot;)
</span><del>-                    if location is None:
</del><ins>+                    if location is not None:
+                        items = location.split(&quot;;&quot;)
+                        has_location = rname in items
+                    else:
+                        has_location = False
+
+                    # Look for matching attendee property
+                    has_attendee = cuaddr in comp.getAttendees()
+
+                    if not has_location and has_attendee:
</ins><span class="cx">                         fail = True
</span><span class="cx">                         break
</span><del>-                    else:
-                        # Test the actual location value matches this location name?
-                        pass
</del><span class="cx"> 
</span><span class="cx">             if fail:
</span><span class="cx">                 details.append(Details(resid, uid,))
</span><span class="cx">                 if self.fix:
</span><del>-                    yield self.fixCalendarData(cal, rname, resid)
</del><ins>+                    yield self.fixCalendarData(cal, rname, cuaddr, resid)
</ins><span class="cx">                     fixed += 1
</span><span class="cx"> 
</span><span class="cx">             if self.options[&quot;verbose&quot;] and not self.options[&quot;summary&quot;]:
</span><span class="lines">@@ -2907,7 +2916,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><del>-    def fixCalendarData(self, cal, rname, location_resid):
</del><ins>+    def fixCalendarData(self, cal, rname, cuaddr, location_resid):
</ins><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         Fix problems in calendar data using store APIs.
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="lines">@@ -2935,14 +2944,20 @@
</span><span class="cx">         except InternalDataStoreError:
</span><span class="cx">             returnValue((False, &quot;Failed parse: &quot;))
</span><span class="cx"> 
</span><del>-        # Add missing location to all components (need to dup component when modifying)
</del><ins>+        # Fix each component (need to dup component when modifying)
</ins><span class="cx">         component = component.duplicate()
</span><span class="cx">         for comp in component.subcomponents():
</span><span class="cx">             if comp.name() != &quot;VEVENT&quot;:
</span><span class="cx">                 continue
</span><span class="cx">             location = comp.propertyValue(&quot;LOCATION&quot;)
</span><span class="cx">             if location is None:
</span><ins>+                # Just add the location name back in
</ins><span class="cx">                 comp.addProperty(Property(&quot;LOCATION&quot;, rname))
</span><ins>+            else:
+                # Remove the matching ATTENDEE property
+                attendee = comp.getAttendeeProperty((cuaddr,))
+                if attendee is not None:
+                    comp.removeProperty(attendee)
</ins><span class="cx"> 
</span><span class="cx">         # Write out fix, commit and get a new transaction
</span><span class="cx">         try:
</span></span></pre></div>
<a id="CalendarServerbranchesreleaseCalendarServer54devcalendarservertoolstestcalverifyresourcesxml"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/release/CalendarServer-5.4-dev/calendarserver/tools/test/calverify/resources.xml (15087 => 15088)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/release/CalendarServer-5.4-dev/calendarserver/tools/test/calverify/resources.xml        2015-09-02 17:06:55 UTC (rev 15087)
+++ CalendarServer/branches/release/CalendarServer-5.4-dev/calendarserver/tools/test/calverify/resources.xml        2015-09-02 17:08:13 UTC (rev 15088)
</span><span class="lines">@@ -7,4 +7,10 @@
</span><span class="cx">     &lt;password&gt;location01&lt;/password&gt;
</span><span class="cx">     &lt;name&gt;Room 01&lt;/name&gt;
</span><span class="cx">   &lt;/location&gt;
</span><ins>+  &lt;location&gt;
+    &lt;uid&gt;location02&lt;/uid&gt;
+    &lt;guid&gt;CDAF464F-9C77-4F56-A7A6-98E4ED9903D6&lt;/guid&gt;
+    &lt;password&gt;location02&lt;/password&gt;
+    &lt;name&gt;Room 02&lt;/name&gt;
+  &lt;/location&gt;
</ins><span class="cx"> &lt;/accounts&gt;
</span></span></pre></div>
<a id="CalendarServerbranchesreleaseCalendarServer54devcalendarservertoolstesttest_calverifypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/release/CalendarServer-5.4-dev/calendarserver/tools/test/test_calverify.py (15087 => 15088)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/release/CalendarServer-5.4-dev/calendarserver/tools/test/test_calverify.py        2015-09-02 17:06:55 UTC (rev 15087)
+++ CalendarServer/branches/release/CalendarServer-5.4-dev/calendarserver/tools/test/test_calverify.py        2015-09-02 17:08:13 UTC (rev 15088)
</span><span class="lines">@@ -943,6 +943,7 @@
</span><span class="cx">     uuid2 = &quot;47B16BB4-DB5F-4BF6-85FE-A7DA54230F92&quot;
</span><span class="cx">     uuid3 = &quot;AC478592-7783-44D1-B2AE-52359B4E8415&quot;
</span><span class="cx">     uuidl1 = &quot;75EA36BE-F71B-40F9-81F9-CF59BF40CA8F&quot;
</span><ins>+    uuidl2 = &quot;CDAF464F-9C77-4F56-A7A6-98E4ED9903D6&quot;
</ins><span class="cx"> 
</span><span class="cx">     def configure(self):
</span><span class="cx">         super(CalVerifyMismatchTestsBase, self).configure()
</span><span class="lines">@@ -3142,6 +3143,7 @@
</span><span class="cx">         &quot;uuid2&quot;: CalVerifyMismatchTestsBase.uuid2,
</span><span class="cx">         &quot;uuid3&quot;: CalVerifyMismatchTestsBase.uuid3,
</span><span class="cx">         &quot;uuidl1&quot;: CalVerifyMismatchTestsBase.uuidl1,
</span><ins>+        &quot;uuidl2&quot;: CalVerifyMismatchTestsBase.uuidl2,
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     # Valid event
</span><span class="lines">@@ -3162,11 +3164,35 @@
</span><span class="cx"> ATTENDEE:urn:uuid:%(uuid1)s
</span><span class="cx"> ATTENDEE:urn:uuid:%(uuid2)s
</span><span class="cx"> ATTENDEE:urn:uuid:%(uuidl1)s
</span><del>-LOCATION:Location 1
</del><ins>+LOCATION:Room 01
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> &quot;&quot;&quot;.replace(&quot;\n&quot;, &quot;\r\n&quot;) % subs
</span><span class="cx"> 
</span><ins>+    # Valid event
+    VALID_MULTI_ICS = &quot;&quot;&quot;BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Apple Inc.//iCal 4.0.1//EN
+CALSCALE:GREGORIAN
+BEGIN:VEVENT
+CREATED:20100303T181216Z
+UID:VALID_MULTI_ICS
+TRANSP:OPAQUE
+SUMMARY:VALID_MULTI_ICS
+DTSTART:%(year)s%(month)02d08T100000Z
+DURATION:PT1H
+DTSTAMP:20100303T181220Z
+SEQUENCE:2
+ORGANIZER:urn:uuid:%(uuid1)s
+ATTENDEE:urn:uuid:%(uuid1)s
+ATTENDEE:urn:uuid:%(uuid2)s
+ATTENDEE:urn:uuid:%(uuidl1)s
+ATTENDEE:urn:uuid:%(uuidl2)s
+LOCATION:Room 01\\;Room 02
+END:VEVENT
+END:VCALENDAR
+&quot;&quot;&quot;.replace(&quot;\n&quot;, &quot;\r\n&quot;) % subs
+
</ins><span class="cx">     # Invalid event
</span><span class="cx">     INVALID_ICS = &quot;&quot;&quot;BEGIN:VCALENDAR
</span><span class="cx"> VERSION:2.0
</span><span class="lines">@@ -3189,6 +3215,30 @@
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> &quot;&quot;&quot;.replace(&quot;\n&quot;, &quot;\r\n&quot;) % subs
</span><span class="cx"> 
</span><ins>+    # Invalid event
+    INVALID_MULTI_ICS = &quot;&quot;&quot;BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Apple Inc.//iCal 4.0.1//EN
+CALSCALE:GREGORIAN
+BEGIN:VEVENT
+CREATED:20100303T181216Z
+UID:INVALID_MULTI_ICS
+TRANSP:OPAQUE
+SUMMARY:INVALID_MULTI_ICS
+DTSTART:%(year)s%(month)02d08T120000Z
+DURATION:PT1H
+DTSTAMP:20100303T181220Z
+SEQUENCE:2
+ORGANIZER:urn:uuid:%(uuid1)s
+ATTENDEE:urn:uuid:%(uuid1)s
+ATTENDEE:urn:uuid:%(uuid2)s
+ATTENDEE:urn:uuid:%(uuidl1)s
+ATTENDEE:urn:uuid:%(uuidl2)s
+LOCATION:Room 02
+END:VEVENT
+END:VCALENDAR
+&quot;&quot;&quot;.replace(&quot;\n&quot;, &quot;\r\n&quot;) % subs
+
</ins><span class="cx">     # Room as organizer event
</span><span class="cx">     ROOM_ORGANIZER_ICS = &quot;&quot;&quot;BEGIN:VCALENDAR
</span><span class="cx"> VERSION:2.0
</span><span class="lines">@@ -3252,14 +3302,22 @@
</span><span class="cx">     allEvents = {
</span><span class="cx">         &quot;invite1.ics&quot;      : (VALID_ICS, CalVerifyMismatchTestsBase.metadata,),
</span><span class="cx">         &quot;invite2.ics&quot;      : (INVALID_ICS, CalVerifyMismatchTestsBase.metadata,),
</span><ins>+        &quot;invite3.ics&quot;      : (VALID_MULTI_ICS, CalVerifyMismatchTestsBase.metadata,),
+        &quot;invite4.ics&quot;      : (INVALID_MULTI_ICS, CalVerifyMismatchTestsBase.metadata,),
</ins><span class="cx">     }
</span><del>-    allEvents_Room = {
</del><ins>+    allEvents_Room1 = {
</ins><span class="cx">         &quot;invite1.ics&quot;      : (VALID_ICS, CalVerifyMismatchTestsBase.metadata,),
</span><span class="cx">         &quot;invite2.ics&quot;      : (INVALID_ICS, CalVerifyMismatchTestsBase.metadata,),
</span><del>-        &quot;invite3.ics&quot;      : (ROOM_ORGANIZER_ICS, CalVerifyMismatchTestsBase.metadata,),
-        &quot;invite4.ics&quot;      : (ROOM_NO_ORGANIZER_ICS, CalVerifyMismatchTestsBase.metadata,),
-        &quot;invite5.ics&quot;      : (ROOM_MISSING_ORGANIZER_ICS, CalVerifyMismatchTestsBase.metadata,),
</del><ins>+        &quot;invite3.ics&quot;      : (VALID_MULTI_ICS, CalVerifyMismatchTestsBase.metadata,),
+        &quot;invite4.ics&quot;      : (INVALID_MULTI_ICS, CalVerifyMismatchTestsBase.metadata,),
+        &quot;invite5.ics&quot;      : (ROOM_ORGANIZER_ICS, CalVerifyMismatchTestsBase.metadata,),
+        &quot;invite6.ics&quot;      : (ROOM_NO_ORGANIZER_ICS, CalVerifyMismatchTestsBase.metadata,),
+        &quot;invite7.ics&quot;      : (ROOM_MISSING_ORGANIZER_ICS, CalVerifyMismatchTestsBase.metadata,),
</ins><span class="cx">     }
</span><ins>+    allEvents_Room2 = {
+        &quot;invite3.ics&quot;      : (VALID_MULTI_ICS, CalVerifyMismatchTestsBase.metadata,),
+        &quot;invite4.ics&quot;      : (INVALID_MULTI_ICS, CalVerifyMismatchTestsBase.metadata,),
+    }
</ins><span class="cx"> 
</span><span class="cx">     requirements = {
</span><span class="cx">         CalVerifyMismatchTestsBase.uuid1 : {
</span><span class="lines">@@ -3275,11 +3333,17 @@
</span><span class="cx">             &quot;inbox&quot; : {},
</span><span class="cx">         },
</span><span class="cx">         CalVerifyMismatchTestsBase.uuidl1 : {
</span><del>-            &quot;calendar&quot; : allEvents_Room,
</del><ins>+            &quot;calendar&quot; : allEvents_Room1,
</ins><span class="cx">             &quot;inbox&quot; : {},
</span><span class="cx">         },
</span><ins>+        CalVerifyMismatchTestsBase.uuidl2 : {
+            &quot;calendar&quot; : allEvents_Room2,
+            &quot;inbox&quot; : {},
+        },
</ins><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    badEvents = set((&quot;INVALID_ICS&quot;, &quot;INVALID_MULTI_ICS&quot;, &quot;ROOM_MISSING_ORGANIZER_ICS&quot;, &quot;ROOM_ORGANIZER_ICS&quot;,))
+
</ins><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_scanMissingLocations(self):
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="lines">@@ -3317,10 +3381,10 @@
</span><span class="cx"> 
</span><span class="cx">         self.assertEqual(calverify.results[&quot;Number of events to process&quot;], len(self.requirements[CalVerifyMismatchTestsBase.uuidl1][&quot;calendar&quot;]))
</span><span class="cx">         self.assertEqual(
</span><del>-            sorted([i.uid for i in calverify.results[&quot;Bad Events&quot;]]),
-            [&quot;INVALID_ICS&quot;, &quot;ROOM_MISSING_ORGANIZER_ICS&quot;, &quot;ROOM_ORGANIZER_ICS&quot;, ]
</del><ins>+            set([i.uid for i in calverify.results[&quot;Bad Events&quot;]]),
+            self.badEvents,
</ins><span class="cx">         )
</span><del>-        self.assertEqual(calverify.results[&quot;Number of bad events&quot;], 3)
</del><ins>+        self.assertEqual(calverify.results[&quot;Number of bad events&quot;], len(self.badEvents))
</ins><span class="cx">         self.assertTrue(&quot;Fix bad events&quot; not in calverify.results)
</span><span class="cx"> 
</span><span class="cx">         sync_token_newl1 = (yield (yield self.calendarUnderTest(home=self.uuidl1, name=&quot;calendar&quot;)).syncToken())
</span><span class="lines">@@ -3373,11 +3437,11 @@
</span><span class="cx"> 
</span><span class="cx">         self.assertEqual(calverify.results[&quot;Number of events to process&quot;], len(self.requirements[CalVerifyMismatchTestsBase.uuidl1][&quot;calendar&quot;]))
</span><span class="cx">         self.assertEqual(
</span><del>-            sorted([i.uid for i in calverify.results[&quot;Bad Events&quot;]]),
-            [&quot;INVALID_ICS&quot;, &quot;ROOM_MISSING_ORGANIZER_ICS&quot;, &quot;ROOM_ORGANIZER_ICS&quot;, ]
</del><ins>+            set([i.uid for i in calverify.results[&quot;Bad Events&quot;]]),
+            self.badEvents,
</ins><span class="cx">         )
</span><del>-        self.assertEqual(calverify.results[&quot;Number of bad events&quot;], 3)
-        self.assertEqual(calverify.results[&quot;Fix bad events&quot;], 3)
</del><ins>+        self.assertEqual(calverify.results[&quot;Number of bad events&quot;], len(self.badEvents))
+        self.assertEqual(calverify.results[&quot;Fix bad events&quot;], len(self.badEvents))
</ins><span class="cx"> 
</span><span class="cx">         sync_token_newl1 = (yield (yield self.calendarUnderTest(home=self.uuidl1, name=&quot;calendar&quot;)).syncToken())
</span><span class="cx">         self.assertNotEqual(sync_token_oldl1, sync_token_newl1)
</span><span class="lines">@@ -3399,7 +3463,7 @@
</span><span class="cx">         calverify = MissingLocationService(self._sqlCalendarStore, options, output, reactor, config)
</span><span class="cx">         yield calverify.doAction()
</span><span class="cx"> 
</span><del>-        self.assertEqual(calverify.results[&quot;Number of events to process&quot;], len(self.requirements[CalVerifyMismatchTestsBase.uuidl1][&quot;calendar&quot;]) - 1)
</del><ins>+        self.assertEqual(calverify.results[&quot;Number of events to process&quot;], len(self.requirements[CalVerifyMismatchTestsBase.uuidl1][&quot;calendar&quot;]) - 2)
</ins><span class="cx">         self.assertEqual(len(calverify.results[&quot;Bad Events&quot;]), 0)
</span><span class="cx">         self.assertTrue(&quot;Fix bad events&quot; not in calverify.results)
</span><span class="cx"> 
</span><span class="lines">@@ -3409,15 +3473,27 @@
</span><span class="cx">             caldata = yield calobj.componentForUser()
</span><span class="cx">             self.assertTrue(&quot;LOCATION:&quot; in str(caldata))
</span><span class="cx"> 
</span><del>-        calobj = yield self.calendarObjectUnderTest(home=uid, calendar_name=&quot;calendar&quot;, name=&quot;invite3.ics&quot;)
</del><ins>+        calobj = yield self.calendarObjectUnderTest(home=self.uuidl1, calendar_name=&quot;calendar&quot;, name=&quot;invite3.ics&quot;)
+        self.assertTrue(calobj is not None)
+
+        calobj = yield self.calendarObjectUnderTest(home=self.uuidl2, calendar_name=&quot;calendar&quot;, name=&quot;invite3.ics&quot;)
+        self.assertTrue(calobj is not None)
+
+        calobj = yield self.calendarObjectUnderTest(home=self.uuidl1, calendar_name=&quot;calendar&quot;, name=&quot;invite4.ics&quot;)
+        self.assertTrue(calobj is None)
+
+        calobj = yield self.calendarObjectUnderTest(home=self.uuidl2, calendar_name=&quot;calendar&quot;, name=&quot;invite4.ics&quot;)
+        self.assertTrue(calobj is not None)
+
+        calobj = yield self.calendarObjectUnderTest(home=self.uuidl1, calendar_name=&quot;calendar&quot;, name=&quot;invite5.ics&quot;)
</ins><span class="cx">         caldata = yield calobj.componentForUser()
</span><span class="cx">         self.assertTrue(&quot;LOCATION:&quot; in str(caldata))
</span><span class="cx"> 
</span><del>-        calobj = yield self.calendarObjectUnderTest(home=uid, calendar_name=&quot;calendar&quot;, name=&quot;invite4.ics&quot;)
</del><ins>+        calobj = yield self.calendarObjectUnderTest(home=self.uuidl1, calendar_name=&quot;calendar&quot;, name=&quot;invite6.ics&quot;)
</ins><span class="cx">         caldata = yield calobj.componentForUser()
</span><span class="cx">         self.assertTrue(&quot;LOCATION:&quot; not in str(caldata))
</span><span class="cx"> 
</span><del>-        calobj = yield self.calendarObjectUnderTest(home=uid, calendar_name=&quot;calendar&quot;, name=&quot;invite5.ics&quot;)
</del><ins>+        calobj = yield self.calendarObjectUnderTest(home=self.uuidl1, calendar_name=&quot;calendar&quot;, name=&quot;invite7.ics&quot;)
</ins><span class="cx">         self.assertTrue(calobj is None)
</span><span class="cx"> 
</span><span class="cx">         yield self.commit()
</span></span></pre>
</div>
</div>

</body>
</html>