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

source_changes at macosforge.org source_changes at macosforge.org
Thu Jul 26 11:27:26 PDT 2012


Revision: 9498
          http://trac.macosforge.org/projects/calendarserver/changeset/9498
Author:   gaya at apple.com
Date:     2012-07-26 11:27:26 -0700 (Thu, 26 Jul 2012)
Log Message:
-----------
add fixes from trunk

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

Modified: CalendarServer/branches/users/gaya/inviteclean/txdav/carddav/datastore/test/common.py
===================================================================
--- CalendarServer/branches/users/gaya/inviteclean/txdav/carddav/datastore/test/common.py	2012-07-26 15:42:25 UTC (rev 9497)
+++ CalendarServer/branches/users/gaya/inviteclean/txdav/carddav/datastore/test/common.py	2012-07-26 18:27:26 UTC (rev 9498)
@@ -288,7 +288,7 @@
         yield self.commit()
         home = yield self.homeUnderTest()
         addressbook = yield home.addressbookWithName("some_other_name")
-        positiveAssertions()
+        yield positiveAssertions()
         # FIXME: revert
         # FIXME: test for multiple renames
         # FIXME: test for conflicting renames (a->b, c->a in the same txn)
@@ -316,6 +316,7 @@
         self.assertIdentical((yield home.addressbookWithName(name)), None)
         yield home.createAddressBookWithName(name)
         self.assertNotIdentical((yield home.addressbookWithName(name)), None)
+        @inlineCallbacks
         def checkProperties():
             addressbookProperties = (yield home.addressbookWithName(name)).properties()
             addressbookType = ResourceType.addressbook #@UndefinedVariable
@@ -325,12 +326,11 @@
                 ],
                 addressbookType
             )
-        checkProperties()
+        yield checkProperties()
         yield self.commit()
 
         # Make sure notification fired after commit
-        self.assertEquals(self.notifierFactory.history,
-            [("update", "CardDAV|home1")])
+        self.assertTrue(("update", "CardDAV|home1") in self.notifierFactory.history)
 
         # Make sure it's available in a new transaction; i.e. test the commit.
         home = yield self.homeUnderTest()
@@ -342,7 +342,7 @@
 
         # Sanity check: are the properties actually persisted?
         # FIXME: no independent testing of this right now
-        checkProperties()
+        yield checkProperties()
 
 
     @inlineCallbacks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120726/3da9f133/attachment.html>


More information about the calendarserver-changes mailing list