[CalendarServer-changes] [6260] CalendarServer/trunk/txdav

source_changes at macosforge.org source_changes at macosforge.org
Wed Sep 8 15:45:39 PDT 2010


Revision: 6260
          http://trac.macosforge.org/projects/calendarserver/changeset/6260
Author:   sagen at apple.com
Date:     2010-09-08 15:45:38 -0700 (Wed, 08 Sep 2010)
Log Message:
-----------
Update notification tests with new prefixes

Modified Paths:
--------------
    CalendarServer/trunk/txdav/caldav/datastore/test/common.py
    CalendarServer/trunk/txdav/carddav/datastore/test/common.py
    CalendarServer/trunk/txdav/common/datastore/file.py

Modified: CalendarServer/trunk/txdav/caldav/datastore/test/common.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/test/common.py	2010-09-08 20:28:19 UTC (rev 6259)
+++ CalendarServer/trunk/txdav/caldav/datastore/test/common.py	2010-09-08 22:45:38 UTC (rev 6260)
@@ -458,7 +458,8 @@
         self.commit()
 
         # Make sure notification fired after commit
-        self.assertEquals(self.notifierFactory.history, [("update", "home1")])
+        self.assertEquals(self.notifierFactory.history,
+            [("update", "CalDAV|home1")])
 
         # Make sure it's available in a new transaction; i.e. test the commit.
         home = self.homeUnderTest()
@@ -503,7 +504,11 @@
         # Make sure notification fired after commit
         self.assertEquals(
             self.notifierFactory.history,
-            [("update", "home1"), ("update", "home1"), ("update", "home1")]
+            [
+                ("update", "CalDAV|home1"),
+                ("update", "CalDAV|home1"),
+                ("update", "CalDAV|home1")
+            ]
         )
 
 
@@ -606,12 +611,12 @@
         self.assertEquals(
             self.notifierFactory.history,
             [
-                ("update", "home1"),
-                ("update", "home1/calendar_1"),
-                ("update", "home1"),
-                ("update", "home1/calendar_1"),
-                ("update", "home1"),
-                ("update", "home1/calendar_1"),
+                ("update", "CalDAV|home1"),
+                ("update", "CalDAV|home1/calendar_1"),
+                ("update", "CalDAV|home1"),
+                ("update", "CalDAV|home1/calendar_1"),
+                ("update", "CalDAV|home1"),
+                ("update", "CalDAV|home1/calendar_1"),
             ]
         )
 
@@ -767,8 +772,8 @@
         self.assertEquals(
             self.notifierFactory.history,
             [
-                ("update", "home1"),
-                ("update", "home1/calendar_1"),
+                ("update", "CalDAV|home1"),
+                ("update", "CalDAV|home1/calendar_1"),
             ]
         )
 
@@ -878,8 +883,8 @@
         self.assertEquals(
             self.notifierFactory.history,
             [
-                ("update", "home1"),
-                ("update", "home1/calendar_1"),
+                ("update", "CalDAV|home1"),
+                ("update", "CalDAV|home1/calendar_1"),
             ]
         )
 

Modified: CalendarServer/trunk/txdav/carddav/datastore/test/common.py
===================================================================
--- CalendarServer/trunk/txdav/carddav/datastore/test/common.py	2010-09-08 20:28:19 UTC (rev 6259)
+++ CalendarServer/trunk/txdav/carddav/datastore/test/common.py	2010-09-08 22:45:38 UTC (rev 6260)
@@ -358,7 +358,8 @@
         self.commit()
 
         # Make sure notification fired after commit
-        self.assertEquals(self.notifierFactory.history, [("update", "home1")])
+        self.assertEquals(self.notifierFactory.history,
+            [("update", "CardDAV|home1")])
 
         # Make sure it's available in a new transaction; i.e. test the commit.
         home = self.homeUnderTest()
@@ -403,7 +404,11 @@
         # Make sure notification fired after commit
         self.assertEquals(
             self.notifierFactory.history,
-            [("update", "home1"), ("update", "home1"), ("update", "home1")]
+            [
+                ("update", "CardDAV|home1"),
+                ("update", "CardDAV|home1"),
+                ("update", "CardDAV|home1")
+            ]
         )
 
 
@@ -521,12 +526,12 @@
         self.assertEquals(
             self.notifierFactory.history,
             [
-                ("update", "home1"),
-                ("update", "home1/addressbook_1"),
-                ("update", "home1"),
-                ("update", "home1/addressbook_1"),
-                ("update", "home1"),
-                ("update", "home1/addressbook_1"),
+                ("update", "CardDAV|home1"),
+                ("update", "CardDAV|home1/addressbook_1"),
+                ("update", "CardDAV|home1"),
+                ("update", "CardDAV|home1/addressbook_1"),
+                ("update", "CardDAV|home1"),
+                ("update", "CardDAV|home1/addressbook_1"),
             ]
         )
 
@@ -655,8 +660,8 @@
         self.assertEquals(
             self.notifierFactory.history,
             [
-                ("update", "home1"),
-                ("update", "home1/addressbook_1"),
+                ("update", "CardDAV|home1"),
+                ("update", "CardDAV|home1/addressbook_1"),
             ]
         )
 
@@ -761,8 +766,8 @@
         self.assertEquals(
             self.notifierFactory.history,
             [
-                ("update", "home1"),
-                ("update", "home1/addressbook_1"),
+                ("update", "CardDAV|home1"),
+                ("update", "CardDAV|home1/addressbook_1"),
             ]
         )
 

Modified: CalendarServer/trunk/txdav/common/datastore/file.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/file.py	2010-09-08 20:28:19 UTC (rev 6259)
+++ CalendarServer/trunk/txdav/common/datastore/file.py	2010-09-08 22:45:38 UTC (rev 6260)
@@ -523,7 +523,7 @@
         Trigger a notification of a change
         """
         if self._notifier:
-            self._txn.postCommit(self._notifier.notify)
+            self._transaction.postCommit(self._notifier.notify)
 
 
 class CommonHomeChild(FileMetaDataMixin, LoggingMixIn, FancyEqMixin):
@@ -774,7 +774,7 @@
         Trigger a notification of a change
         """
         if self._notifier:
-            self._txn.postCommit(self._notifier.notify)
+            self._transaction.postCommit(self._notifier.notify)
 
 
 class CommonObjectResource(FileMetaDataMixin, LoggingMixIn, FancyEqMixin):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100908/c1c13bc2/attachment-0001.html>


More information about the calendarserver-changes mailing list