<!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>[13305] CalendarServer/trunk/txdav</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/13305">13305</a></dd>
<dt>Author</dt> <dd>cdaboo@apple.com</dd>
<dt>Date</dt> <dd>2014-04-17 08:24:49 -0700 (Thu, 17 Apr 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Fix some issues with group expansion.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServertrunktxdavcaldavdatastoretestcommonpy">CalendarServer/trunk/txdav/caldav/datastore/test/common.py</a></li>
<li><a href="#CalendarServertrunktxdavcarddavdatastoretestcommonpy">CalendarServer/trunk/txdav/carddav/datastore/test/common.py</a></li>
<li><a href="#CalendarServertrunktxdavcarddavdatastoretesttest_sqlpy">CalendarServer/trunk/txdav/carddav/datastore/test/test_sql.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastoretestutilpy">CalendarServer/trunk/txdav/common/datastore/test/util.py</a></li>
<li><a href="#CalendarServertrunktxdavwhogroupspy">CalendarServer/trunk/txdav/who/groups.py</a></li>
<li><a href="#CalendarServertrunktxdavwhotesttest_group_attendeespy">CalendarServer/trunk/txdav/who/test/test_group_attendees.py</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServertrunktxdavcaldavdatastoretestcommonpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/test/common.py (13304 => 13305)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/test/common.py        2014-04-17 00:26:27 UTC (rev 13304)
+++ CalendarServer/trunk/txdav/caldav/datastore/test/common.py        2014-04-17 15:24:49 UTC (rev 13305)
</span><span class="lines">@@ -252,7 +252,6 @@
</span><span class="cx"> "calendar_empty": {},
</span><span class="cx"> "not_a_calendar": None
</span><span class="cx"> },
</span><del>- "not_a_home": None,
</del><span class="cx"> "home_splits": {
</span><span class="cx"> "calendar_1": {
</span><span class="cx"> "1.ics": (cal1SplitsRoot.child("1.ics").getContent(), metadata1),
</span><span class="lines">@@ -297,7 +296,6 @@
</span><span class="cx"> "calendar_empty": {},
</span><span class="cx"> "not_a_calendar": None
</span><span class="cx"> },
</span><del>- "not_a_home": None,
</del><span class="cx"> "home_splits": {
</span><span class="cx"> "calendar_1": {
</span><span class="cx"> "1.ics": md5Values[0],
</span></span></pre></div>
<a id="CalendarServertrunktxdavcarddavdatastoretestcommonpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/carddav/datastore/test/common.py (13304 => 13305)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/carddav/datastore/test/common.py        2014-04-17 00:26:27 UTC (rev 13304)
+++ CalendarServer/trunk/txdav/carddav/datastore/test/common.py        2014-04-17 15:24:49 UTC (rev 13305)
</span><span class="lines">@@ -170,7 +170,6 @@
</span><span class="cx"> "6.vcf": adbk3Root.child("6.vcf").getContent(),
</span><span class="cx"> },
</span><span class="cx"> },
</span><del>- "not_a_home": None
</del><span class="cx"> }
</span><span class="cx"> md5s = {
</span><span class="cx"> "home1": {
</span><span class="lines">@@ -200,7 +199,6 @@
</span><span class="cx"> "6.vcf": md5Values[5],
</span><span class="cx"> },
</span><span class="cx"> },
</span><del>- "not_a_home": None
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> def storeUnderTest(self):
</span></span></pre></div>
<a id="CalendarServertrunktxdavcarddavdatastoretesttest_sqlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/carddav/datastore/test/test_sql.py (13304 => 13305)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/carddav/datastore/test/test_sql.py        2014-04-17 00:26:27 UTC (rev 13304)
+++ CalendarServer/trunk/txdav/carddav/datastore/test/test_sql.py        2014-04-17 15:24:49 UTC (rev 13305)
</span><span class="lines">@@ -80,8 +80,8 @@
</span><span class="cx"> populateTxn = self.storeUnderTest().newTransaction()
</span><span class="cx"> for homeUID in self.requirements:
</span><span class="cx"> addressbooks = self.requirements[homeUID]
</span><ins>+ home = yield populateTxn.addressbookHomeWithUID(homeUID, True)
</ins><span class="cx"> if addressbooks is not None:
</span><del>- home = yield populateTxn.addressbookHomeWithUID(homeUID, True)
</del><span class="cx"> addressbook = home.addressbook()
</span><span class="cx">
</span><span class="cx"> addressbookObjNames = addressbooks[addressbook.name()]
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastoretestutilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/test/util.py (13304 => 13305)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/test/util.py        2014-04-17 00:26:27 UTC (rev 13304)
+++ CalendarServer/trunk/txdav/common/datastore/test/util.py        2014-04-17 15:24:49 UTC (rev 13305)
</span><span class="lines">@@ -488,8 +488,8 @@
</span><span class="cx"> populateTxn._migrating = True
</span><span class="cx"> for homeUID in requirements:
</span><span class="cx"> calendars = requirements[homeUID]
</span><ins>+ home = yield populateTxn.calendarHomeWithUID(homeUID, True)
</ins><span class="cx"> if calendars is not None:
</span><del>- home = yield populateTxn.calendarHomeWithUID(homeUID, True)
</del><span class="cx"> # We don't want the default calendar or inbox to appear unless it's
</span><span class="cx"> # explicitly listed.
</span><span class="cx"> try:
</span><span class="lines">@@ -516,6 +516,7 @@
</span><span class="cx"> internal_state=ComponentUpdateState.RAW,
</span><span class="cx"> options=metadata,
</span><span class="cx"> )
</span><ins>+
</ins><span class="cx"> yield populateTxn.commit()
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunktxdavwhogroupspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/who/groups.py (13304 => 13305)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/who/groups.py        2014-04-17 00:26:27 UTC (rev 13304)
+++ CalendarServer/trunk/txdav/who/groups.py        2014-04-17 15:24:49 UTC (rev 13305)
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx"> from twext.enterprise.jobqueue import WorkItem, PeerConnectionPool
</span><span class="cx"> from twisted.internet.defer import inlineCallbacks, returnValue
</span><span class="cx"> from txdav.common.datastore.sql_tables import schema
</span><del>-from txdav.caldav.datastore.sql import Calendar
</del><ins>+from txdav.caldav.datastore.sql import CalendarStoreFeatures
</ins><span class="cx"> import datetime
</span><span class="cx"> import hashlib
</span><span class="cx">
</span><span class="lines">@@ -175,26 +175,14 @@
</span><span class="cx"> )
</span><span class="cx"> ).on(self.transaction)
</span><span class="cx">
</span><del>- # get calendar id
- co = schema.CALENDAR_OBJECT
- rows = yield Select(
- [co.CALENDAR_RESOURCE_ID, ],
- From=co,
- Where=co.RESOURCE_ID == self.resourceID,
- ).on(self.transaction)
- calendarID = rows[0][0]
</del><ins>+ # get db object
+ calendarObject = (yield CalendarStoreFeatures(self.transaction._store).calendarObjectWithID(self.transaction, self.resourceID))
+ component = yield calendarObject.componentForUser()
</ins><span class="cx">
</span><del>- # get home id
- calendarHomeID = (yield Calendar._ownerHomeWithResourceID.on(
- self.transaction, resourceID=calendarID)
- )[0][0]
</del><ins>+ # Change a copy of the original, as we need the original cached on the resource
+ # so we can do a diff to test implicit scheduling changes
+ component = component.duplicate()
</ins><span class="cx">
</span><del>- # get db objects
- calendarHome = yield self.transaction.calendarHomeWithResourceID(calendarHomeID)
- calendar = yield calendarHome.childWithID(calendarID)
- calendarObject = yield calendar.objectResourceWithID(self.resourceID)
- component = yield calendarObject.component()
-
</del><span class="cx"> # TODO: Check performance because:
</span><span class="cx"> # 1) if the component is changed then expandGroupAttendee() will be called again to validate
</span><span class="cx"> # 2) The group and members are in the group cache so could use them here
</span></span></pre></div>
<a id="CalendarServertrunktxdavwhotesttest_group_attendeespy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/who/test/test_group_attendees.py (13304 => 13305)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/who/test/test_group_attendees.py        2014-04-17 00:26:27 UTC (rev 13304)
+++ CalendarServer/trunk/txdav/who/test/test_group_attendees.py        2014-04-17 15:24:49 UTC (rev 13305)
</span><span class="lines">@@ -70,15 +70,23 @@
</span><span class="cx"> self.notifierFactory.reset()
</span><span class="cx">
</span><span class="cx"> requirements = {
</span><del>- "10000000-0000-0000-0000-000000000001" : {
- "calendar" : {}
- },
- "10000000-0000-0000-0000-000000000002" : {
- "calendar" : {}
- },
</del><ins>+ "10000000-0000-0000-0000-000000000001" : None,
+ "10000000-0000-0000-0000-000000000002" : None,
+ "10000000-0000-0000-0000-000000000006" : None,
+ "10000000-0000-0000-0000-000000000007" : None,
+ "10000000-0000-0000-0000-000000000008" : None,
+ "10000000-0000-0000-0000-000000000009" : None,
+ "10000000-0000-0000-0000-000000000010" : None,
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><ins>+ def _verifyObjectResourceCount(self, home, expected_count):
+ cal6 = yield self.calendarUnderTest(name="calendar", home=home)
+ count = yield cal6.countObjectResources()
+ self.assertEqual(count, expected_count)
+
+
+ @inlineCallbacks
</ins><span class="cx"> def test_simplePUT(self):
</span><span class="cx"> """
</span><span class="cx"> Test that group attendee is expanded on PUT
</span><span class="lines">@@ -121,6 +129,9 @@
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """
</span><span class="cx">
</span><ins>+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000006", 0)
+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000007", 0)
+
</ins><span class="cx"> vcalendar1 = Component.fromString(data_put_1)
</span><span class="cx"> yield calendar.createCalendarObjectWithName("data1.ics", vcalendar1)
</span><span class="cx"> yield self.commit()
</span><span class="lines">@@ -129,7 +140,10 @@
</span><span class="cx"> vcalendar2 = yield cobj1.component()
</span><span class="cx"> self.assertEqual(normalize_iCalStr(vcalendar2), normalize_iCalStr(data_get_1))
</span><span class="cx">
</span><ins>+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000006", 1)
+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000007", 1)
</ins><span class="cx">
</span><ins>+
</ins><span class="cx"> @inlineCallbacks
</span><span class="cx"> def test_unknownPUT(self):
</span><span class="cx"> """
</span><span class="lines">@@ -236,6 +250,12 @@
</span><span class="cx"> """
</span><span class="cx"> Test that nested groups are expanded expanded on PUT
</span><span class="cx"> """
</span><ins>+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000006", 0)
+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000007", 0)
+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000008", 0)
+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000009", 0)
+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000010", 0)
+
</ins><span class="cx"> calendar = yield self.calendarUnderTest(name="calendar", home="10000000-0000-0000-0000-000000000001")
</span><span class="cx">
</span><span class="cx"> data_put_1 = """BEGIN:VCALENDAR
</span><span class="lines">@@ -285,12 +305,23 @@
</span><span class="cx"> vcalendar2 = yield cobj1.component()
</span><span class="cx"> self.assertEqual(normalize_iCalStr(vcalendar2), normalize_iCalStr(data_get_1))
</span><span class="cx">
</span><ins>+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000006", 1)
+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000007", 1)
+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000008", 1)
+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000009", 1)
+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000010", 1)
</ins><span class="cx">
</span><ins>+
</ins><span class="cx"> @inlineCallbacks
</span><span class="cx"> def test_multiGroupPUT(self):
</span><span class="cx"> """
</span><span class="cx"> Test that expanded users in two primary groups have groups in MEMBERS param
</span><span class="cx"> """
</span><ins>+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000006", 0)
+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000007", 0)
+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000008", 0)
+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000009", 0)
+
</ins><span class="cx"> calendar = yield self.calendarUnderTest(name="calendar", home="10000000-0000-0000-0000-000000000001")
</span><span class="cx">
</span><span class="cx"> data_put_1 = """BEGIN:VCALENDAR
</span><span class="lines">@@ -343,11 +374,16 @@
</span><span class="cx"> vcalendar2 = yield cobj1.component()
</span><span class="cx"> self.assertEqual(normalize_iCalStr(vcalendar2), normalize_iCalStr(data_get_1))
</span><span class="cx">
</span><ins>+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000006", 1)
+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000007", 1)
+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000008", 1)
+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000009", 1)
</ins><span class="cx">
</span><ins>+
</ins><span class="cx"> @inlineCallbacks
</span><span class="cx"> def test_groupChange(self):
</span><span class="cx"> """
</span><del>- Test that group attendee is expanded on PUT
</del><ins>+ Test that group attendee changes are applied to existing resources.
</ins><span class="cx"> """
</span><span class="cx"> data_put_1 = """BEGIN:VCALENDAR
</span><span class="cx"> CALSCALE:GREGORIAN
</span><span class="lines">@@ -366,23 +402,6 @@
</span><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR"""
</span><span class="cx">
</span><del>- data_get_1 = """BEGIN:VCALENDAR
-VERSION:2.0
-CALSCALE:GREGORIAN
-PRODID:-//Example Inc.//Example Calendar//EN
-BEGIN:VEVENT
-UID:event1@ninevah.local
-DTSTART;TZID=US/Eastern:20140101T100000
-DURATION:PT1H
-ATTENDEE;CN=User 01;EMAIL=user01@example.com;RSVP=TRUE:urn:uuid:10000000-0000-0000-0000-000000000001
-ATTENDEE;CN=Group 02;CUTYPE=GROUP;EMAIL=group02@example.com;RSVP=TRUE;SCHEDULE-STATUS=3.7:urn:uuid:20000000-0000-0000-0000-000000000002
-CREATED:20060101T150000Z
-ORGANIZER;CN=User 01;EMAIL=user01@example.com:urn:uuid:10000000-0000-0000-0000-000000000001
-SUMMARY:event 1
-END:VEVENT
-END:VCALENDAR
-"""
-
</del><span class="cx"> data_get_2 = """BEGIN:VCALENDAR
</span><span class="cx"> VERSION:2.0
</span><span class="cx"> CALSCALE:GREGORIAN
</span><span class="lines">@@ -410,17 +429,15 @@
</span><span class="cx"> DURATION:PT1H
</span><span class="cx"> ATTENDEE;CN=User 02;EMAIL=user02@example.com;RSVP=TRUE:urn:uuid:10000000-0000-0000-0000-000000000002
</span><span class="cx"> ATTENDEE;CN=Group 01;CUTYPE=GROUP;EMAIL=group01@example.com;RSVP=TRUE;SCHEDULE-STATUS=3.7:urn:uuid:20000000-0000-0000-0000-000000000001
</span><del>-ATTENDEE;CN=User 01;EMAIL=user01@example.com;MEMBER="urn:uuid:20000000-0000-0000-0000-000000000001";PARTSTAT=NEEDS-ACTION:urn:uuid:10000000-0000-0000-0000-000000000001
</del><ins>+ATTENDEE;CN=User 01;EMAIL=user01@example.com;MEMBER="urn:uuid:20000000-0000-0000-0000-000000000001";PARTSTAT=NEEDS-ACTION;RSVP=TRUE;SCHEDULE-STATUS=1.2:urn:uuid:10000000-0000-0000-0000-000000000001
</ins><span class="cx"> CREATED:20060101T150000Z
</span><span class="cx"> ORGANIZER;CN=User 02;EMAIL=user02@example.com:urn:uuid:10000000-0000-0000-0000-000000000002
</span><ins>+SEQUENCE:1
</ins><span class="cx"> SUMMARY:event 1
</span><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """
</span><span class="cx">
</span><del>- #TODO: should User 01 have SCHEDULE-STATUS=3.7 ?
-
-
</del><span class="cx"> @inlineCallbacks
</span><span class="cx"> def expandedMembers(self, records=None):
</span><span class="cx"> yield None
</span><span class="lines">@@ -442,6 +459,9 @@
</span><span class="cx"> vcalendar2 = yield cobj1.component()
</span><span class="cx"> self.assertEqual(normalize_iCalStr(vcalendar2), normalize_iCalStr(data_get_2))
</span><span class="cx">
</span><ins>+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000001", 0)
+ yield self.commit()
+
</ins><span class="cx"> self.patch(CalendarDirectoryRecordMixin, "expandedMembers", unpatchedExpandedMembers)
</span><span class="cx">
</span><span class="cx"> groupCacher = GroupCacher(self.transactionUnderTest().directoryService())
</span><span class="lines">@@ -454,3 +474,34 @@
</span><span class="cx"> cobj1 = yield self.calendarObjectUnderTest(name="data1.ics", calendar_name="calendar", home="10000000-0000-0000-0000-000000000002")
</span><span class="cx"> vcalendar3 = yield cobj1.component()
</span><span class="cx"> self.assertEqual(normalize_iCalStr(vcalendar3), normalize_iCalStr(data_get_3))
</span><ins>+
+ yield self._verifyObjectResourceCount("10000000-0000-0000-0000-000000000001", 1)
+ yield self.commit()
+
+ self.patch(CalendarDirectoryRecordMixin, "expandedMembers", expandedMembers)
+ groupCacher = GroupCacher(self.transactionUnderTest().directoryService())
+ wps = yield groupCacher.refreshGroup(self.transactionUnderTest(), "20000000-0000-0000-0000-000000000001")
+ yield self.commit()
+ self.assertEqual(len(wps), 1)
+ for wp in wps:
+ yield wp.whenExecuted()
+
+ cobj1 = yield self.calendarObjectUnderTest(name="data1.ics", calendar_name="calendar", home="10000000-0000-0000-0000-000000000002")
+ vcalendar3 = yield cobj1.component()
+ self.assertEqual(normalize_iCalStr(vcalendar3), normalize_iCalStr(data_get_2))
+
+ cal1 = yield self.calendarUnderTest(name="calendar", home="10000000-0000-0000-0000-000000000001")
+ cobjs = yield cal1.objectResources()
+ self.assertEqual(len(cobjs), 1)
+ comp1 = yield cobjs[0].componentForUser()
+ self.assertTrue("STATUS:CANCELLED" in str(comp1))
+
+
+ @inlineCallbacks
+ def test_groupRemoval(self):
+ """
+ Test that removing a group also removes the expanded attendees. This needs to make sure
+ that an attendee in two groups is NOT removed if only one of those groups is removed
+ """
+
+ self.fail("FIXME: implement this test")
</ins></span></pre>
</div>
</div>
</body>
</html>