[CalendarServer-changes] [2366]
CalendarServer/branches/propfind-cache/twistedcaldav/directory
source_changes at macosforge.org
source_changes at macosforge.org
Mon May 5 10:35:33 PDT 2008
Revision: 2366
http://trac.macosforge.org/projects/calendarserver/changeset/2366
Author: dreid at apple.com
Date: 2008-05-05 10:35:32 -0700 (Mon, 05 May 2008)
Log Message:
-----------
Principal resources get a cacheNotifier
Modified Paths:
--------------
CalendarServer/branches/propfind-cache/twistedcaldav/directory/principal.py
CalendarServer/branches/propfind-cache/twistedcaldav/directory/test/test_principal.py
Modified: CalendarServer/branches/propfind-cache/twistedcaldav/directory/principal.py
===================================================================
--- CalendarServer/branches/propfind-cache/twistedcaldav/directory/principal.py 2008-05-02 18:03:13 UTC (rev 2365)
+++ CalendarServer/branches/propfind-cache/twistedcaldav/directory/principal.py 2008-05-05 17:35:32 UTC (rev 2366)
@@ -41,6 +41,8 @@
from twisted.web2.dav.util import joinURL
from twistedcaldav.config import config
+from twistedcaldav.cache import CacheChangeNotifier
+
from twistedcaldav.directory.calendaruserproxy import CalendarUserProxyDatabase
from twistedcaldav.directory.calendaruserproxy import CalendarUserProxyPrincipalResource
from twistedcaldav.directory.directory import DirectoryService
@@ -353,6 +355,8 @@
"""
super(DirectoryPrincipalResource, self).__init__(path)
+ self.cacheNotifier = CacheChangeNotifier(self.deadProperties())
+
if self.isCollection():
slash = "/"
else:
Modified: CalendarServer/branches/propfind-cache/twistedcaldav/directory/test/test_principal.py
===================================================================
--- CalendarServer/branches/propfind-cache/twistedcaldav/directory/test/test_principal.py 2008-05-02 18:03:13 UTC (rev 2365)
+++ CalendarServer/branches/propfind-cache/twistedcaldav/directory/test/test_principal.py 2008-05-05 17:35:32 UTC (rev 2366)
@@ -40,6 +40,8 @@
from twistedcaldav.directory.principal import DirectoryPrincipalResource
from twistedcaldav.directory.principal import DirectoryCalendarPrincipalResource
+from twistedcaldav.cache import CacheChangeNotifier
+
import twistedcaldav.test.util
directoryServices = (
@@ -226,6 +228,15 @@
# DirectoryPrincipalResource
##
+ def test_cacheNotifier(self):
+ """
+ Each DirectoryPrincipalResource should have a cacheNotifier attribute
+ that is an instance of CacheChangeNotifier
+ """
+ for provisioningResource, recordType, recordResource, record in self._allRecords():
+ self.failUnless(isinstance(recordResource.cacheNotifier,
+ CacheChangeNotifier))
+
def test_displayName(self):
"""
DirectoryPrincipalResource.displayName()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080505/b5fd3137/attachment.html
More information about the calendarserver-changes
mailing list