[CalendarServer-changes] [9476] CalendarServer/branches/users/gaya/inviteclean/txdav/caldav/ datastore/test/common.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Jul 20 20:16:26 PDT 2012


Revision: 9476
          http://trac.macosforge.org/projects/calendarserver/changeset/9476
Author:   gaya at apple.com
Date:     2012-07-20 20:16:25 -0700 (Fri, 20 Jul 2012)
Log Message:
-----------
use asInvited() instead of retrieveOldInvites().allRecords()

Modified Paths:
--------------
    CalendarServer/branches/users/gaya/inviteclean/txdav/caldav/datastore/test/common.py

Modified: CalendarServer/branches/users/gaya/inviteclean/txdav/caldav/datastore/test/common.py
===================================================================
--- CalendarServer/branches/users/gaya/inviteclean/txdav/caldav/datastore/test/common.py	2012-07-21 01:03:50 UTC (rev 9475)
+++ CalendarServer/branches/users/gaya/inviteclean/txdav/caldav/datastore/test/common.py	2012-07-21 03:16:25 UTC (rev 9476)
@@ -1030,11 +1030,9 @@
         self.assertEqual(newName, self.sharedName)
         self.assertNotIdentical(otherCal, None)
 
-        # FIXME: permission information should be visible on the retrieved
-        # calendar object, we shoudln't need to go via the legacy API.
-        invites = yield cal.retrieveOldInvites().allRecords()
-        self.assertEqual(len(invites), 1)
-        self.assertEqual(invites[0].access, "read-only")
+        invitedCals = yield cal.asInvited()
+        self.assertEqual(len(invitedCals), 1)
+        self.assertEqual(invitedCals[0].shareMode(), _BIND_MODE_READ)
 
 
     @inlineCallbacks
@@ -1051,8 +1049,8 @@
         newName = yield cal.unshareWith(other)
         otherCal = yield other.sharedChildWithName(newName)
         self.assertIdentical(otherCal, None)
-        invites = yield cal.retrieveOldInvites().allRecords()
-        self.assertEqual(len(invites), 0)
+        invitedCals = yield cal.asInvited()
+        self.assertEqual(len(invitedCals), 0)
         shares = yield other.retrieveOldShares().allRecords()
         self.assertEqual(len(shares), 0)
 
@@ -1072,8 +1070,8 @@
         yield cal.unshare()
         otherCal = yield other.sharedChildWithName(self.sharedName)
         self.assertEqual(otherCal, None)
-        invites = yield cal.retrieveOldInvites().allRecords()
-        self.assertEqual(len(invites), 0)
+        invitedCals = yield cal.asInvited()
+        self.assertEqual(len(invitedCals), 0)
         shares = yield other.retrieveOldShares().allRecords()
         self.assertEqual(len(shares), 0)
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120720/3b846f33/attachment.html>


More information about the calendarserver-changes mailing list