[CalendarServer-changes] [10583] CalendarServer/branches/users/glyph/unshare-when-access-revoked
source_changes at macosforge.org
source_changes at macosforge.org
Mon Jan 28 19:29:07 PST 2013
Revision: 10583
http://trac.calendarserver.org//changeset/10583
Author: glyph at apple.com
Date: 2013-01-28 19:29:07 -0800 (Mon, 28 Jan 2013)
Log Message:
-----------
Remove principalsResource attribute and update the only test that used it.
Modified Paths:
--------------
CalendarServer/branches/users/glyph/unshare-when-access-revoked/twistedcaldav/test/test_wrapping.py
CalendarServer/branches/users/glyph/unshare-when-access-revoked/twistedcaldav/test/util.py
Property Changed:
----------------
CalendarServer/branches/users/glyph/unshare-when-access-revoked/
Modified: CalendarServer/branches/users/glyph/unshare-when-access-revoked/twistedcaldav/test/test_wrapping.py
===================================================================
--- CalendarServer/branches/users/glyph/unshare-when-access-revoked/twistedcaldav/test/test_wrapping.py 2013-01-29 03:29:06 UTC (rev 10582)
+++ CalendarServer/branches/users/glyph/unshare-when-access-revoked/twistedcaldav/test/test_wrapping.py 2013-01-29 03:29:07 UTC (rev 10583)
@@ -236,6 +236,15 @@
pathTypes = ['calendar', 'addressbook']
+ def checkPrincipalCollections(self, resource):
+ """
+ Verify that the C{_principalCollections} attribute of the given
+ L{Resource} is accurately set.
+ """
+ self.assertEquals(resource._principalCollections,
+ frozenset([self.directoryFixture.principalsResource]))
+
+
@inlineCallbacks
def test_autoRevertUnCommitted(self):
"""
@@ -392,8 +401,7 @@
"calendars/users/wsanchez/calendar/1.ics"
)
yield self.commit()
- self.assertEquals(calDavFileCalendar._principalCollections,
- frozenset([self.principalsResource]))
+ self.checkPrincipalCollections(calDavFileCalendar)
self.assertEquals(calDavFileCalendar._associatedTransaction,
calendarHome._associatedTransaction)
@@ -435,8 +443,7 @@
"calendars/users/wsanchez/calendar/xyzzy.ics"
)
yield self.commit()
- self.assertEquals(calDavFileCalendar._principalCollections,
- frozenset([self.principalsResource]))
+ self.checkPrincipalCollections(calDavFileCalendar)
def test_createAddressBookStore(self):
@@ -468,8 +475,7 @@
"""
calDavFile = yield self.getResource("addressbooks/users/wsanchez/addressbook")
yield self.commit()
- self.assertEquals(calDavFile._principalCollections,
- frozenset([self.principalsResource]))
+ self.checkPrincipalCollections(calDavFile)
@inlineCallbacks
@@ -487,8 +493,7 @@
yield calDavFile.createAddressBookCollection()
self.assertTrue(calDavFile.exists())
yield self.commit()
- self.assertEquals(calDavFile._principalCollections,
- frozenset([self.principalsResource]))
+ self.checkPrincipalCollections(calDavFile)
@inlineCallbacks
@@ -503,8 +508,7 @@
"addressbooks/users/wsanchez/addressbook/1.vcf"
)
yield self.commit()
- self.assertEquals(calDavFileAddressBook._principalCollections,
- frozenset([self.principalsResource]))
+ self.checkPrincipalCollections(calDavFileAddressBook)
@inlineCallbacks
@@ -518,8 +522,7 @@
"addressbooks/users/wsanchez/addressbook/xyzzy.ics"
)
yield self.commit()
- self.assertEquals(calDavFileAddressBook._principalCollections,
- frozenset([self.principalsResource]))
+ self.checkPrincipalCollections(calDavFileAddressBook)
@inlineCallbacks
Modified: CalendarServer/branches/users/glyph/unshare-when-access-revoked/twistedcaldav/test/util.py
===================================================================
--- CalendarServer/branches/users/glyph/unshare-when-access-revoked/twistedcaldav/test/util.py 2013-01-29 03:29:06 UTC (rev 10582)
+++ CalendarServer/branches/users/glyph/unshare-when-access-revoked/twistedcaldav/test/util.py 2013-01-29 03:29:07 UTC (rev 10583)
@@ -231,14 +231,6 @@
return self.directoryFixture.directoryService
- @property
- def principalsResource(self):
- """
- Read-only alias for L{DirectoryFixture.principalsResource} for
- compatibility with older tests. TODO: remove this.
- """
-
-
def setUp(self):
super(TestCase, self).setUp()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130128/54e4151c/attachment-0001.html>
More information about the calendarserver-changes
mailing list