[CalendarServer-changes] [5826] CalendarServer/branches/new-store/txcarddav

source_changes at macosforge.org source_changes at macosforge.org
Wed Jun 30 19:45:38 PDT 2010


Revision: 5826
          http://trac.macosforge.org/projects/calendarserver/changeset/5826
Author:   cdaboo at apple.com
Date:     2010-06-30 19:45:32 -0700 (Wed, 30 Jun 2010)
Log Message:
-----------
Fix some tests.

Modified Paths:
--------------
    CalendarServer/branches/new-store/txcarddav/addressbookstore/test/common.py
    CalendarServer/branches/new-store/txcarddav/addressbookstore/test/test_file.py
    CalendarServer/branches/new-store/txcarddav/iaddressbookstore.py

Modified: CalendarServer/branches/new-store/txcarddav/addressbookstore/test/common.py
===================================================================
--- CalendarServer/branches/new-store/txcarddav/addressbookstore/test/common.py	2010-06-30 22:47:22 UTC (rev 5825)
+++ CalendarServer/branches/new-store/txcarddav/addressbookstore/test/common.py	2010-07-01 02:45:32 UTC (rev 5826)
@@ -25,7 +25,8 @@
 from txdav.idav import IPropertyStore
 from txdav.propertystore.base import PropertyName
 
-from txdav.common.icommondatastore import HomeChildNameAlreadyExistsError
+from txdav.common.icommondatastore import HomeChildNameAlreadyExistsError,\
+    ICommonDataStore, ICommonStoreTransaction
 from txdav.common.icommondatastore import InvalidObjectResourceError
 from txdav.common.icommondatastore import NoSuchHomeChildError
 from txdav.common.icommondatastore import NoSuchObjectResourceError
@@ -210,7 +211,7 @@
         attributes.
         """
         addressbookStore = self.storeUnderTest()
-        self.assertProvides(IAddressBookStore, addressbookStore)
+        self.assertProvides(ICommonDataStore, addressbookStore)
 
 
     def test_transactionProvides(self):
@@ -218,7 +219,7 @@
         The transactions generated by the addressbook store provide
         L{IAddressBookStoreTransaction} and its required attributes.
         """
-        self.assertProvides(IAddressBookStoreTransaction,
+        self.assertProvides(ICommonStoreTransaction,
                             self.storeUnderTest().newTransaction())
 
 

Modified: CalendarServer/branches/new-store/txcarddav/addressbookstore/test/test_file.py
===================================================================
--- CalendarServer/branches/new-store/txcarddav/addressbookstore/test/test_file.py	2010-06-30 22:47:22 UTC (rev 5825)
+++ CalendarServer/branches/new-store/txcarddav/addressbookstore/test/test_file.py	2010-07-01 02:45:32 UTC (rev 5826)
@@ -52,11 +52,12 @@
     test.root = FilePath(test.mktemp())
     test.root.createDirectory()
 
-    addressbookPath = test.addressbookPath = test.root.child("store")
+    storeRootPath = test.storeRootPath = test.root.child("store")
+    addressbookPath = storeRootPath.child("addressbooks").child("__uids__")
+    addressbookPath.parent().makedirs()
     storePath.copyTo(addressbookPath)
 
-
-    test.addressbookStore = AddressBookStore(addressbookPath)
+    test.addressbookStore = AddressBookStore(storeRootPath)
     test.txn = test.addressbookStore.newTransaction()
     assert test.addressbookStore is not None, "No addressbook store?"
 
@@ -437,7 +438,7 @@
         constructor argument.
         """
         self.assertEquals(self.storeUnderTest()._path,
-                          self.addressbookPath)
+                          self.storeRootPath)
 
 
     def test_addressbookObjectsWithDotFile(self):

Modified: CalendarServer/branches/new-store/txcarddav/iaddressbookstore.py
===================================================================
--- CalendarServer/branches/new-store/txcarddav/iaddressbookstore.py	2010-06-30 22:47:22 UTC (rev 5825)
+++ CalendarServer/branches/new-store/txcarddav/iaddressbookstore.py	2010-07-01 02:45:32 UTC (rev 5826)
@@ -50,7 +50,7 @@
         @return: a string.
         """
 
-    def created(self):
+    def created():
         """
         Addressbook home was created. Do initialization
         """
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100630/f34a06d2/attachment.html>


More information about the calendarserver-changes mailing list