[CalendarServer-changes] [11167] CalendarServer/branches/users/gaya/sharedgroups-3/txdav/carddav/ datastore/test
source_changes at macosforge.org
source_changes at macosforge.org
Fri May 10 15:42:43 PDT 2013
Revision: 11167
http://trac.calendarserver.org//changeset/11167
Author: gaya at apple.com
Date: 2013-05-10 15:42:43 -0700 (Fri, 10 May 2013)
Log Message:
-----------
fix txdav.carddav.datastore.test.test_sql.AddressBookSQLStorageTests
Modified Paths:
--------------
CalendarServer/branches/users/gaya/sharedgroups-3/txdav/carddav/datastore/test/common.py
CalendarServer/branches/users/gaya/sharedgroups-3/txdav/carddav/datastore/test/test_sql.py
Modified: CalendarServer/branches/users/gaya/sharedgroups-3/txdav/carddav/datastore/test/common.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups-3/txdav/carddav/datastore/test/common.py 2013-05-10 22:09:44 UTC (rev 11166)
+++ CalendarServer/branches/users/gaya/sharedgroups-3/txdav/carddav/datastore/test/common.py 2013-05-10 22:42:43 UTC (rev 11167)
@@ -317,21 +317,6 @@
@inlineCallbacks
- def test_createAddressBookWithName_exists(self):
- """
- L{IAddressBookHome.createAddressBookWithName} raises
- L{AddressBookAlreadyExistsError} when the name conflicts with an already-
- existing address book.
- """
- for name in home1_addressbookNames:
- yield self.failUnlessFailure(
- maybeDeferred(
- (yield self.homeUnderTest()).createAddressBookWithName, name),
- HomeChildNameAlreadyExistsError,
- )
-
-
- @inlineCallbacks
def test_removeAddressBookWithName_exists(self):
"""
L{IAddressBookHome.removeAddressBookWithName} removes a addressbook that already
@@ -872,7 +857,8 @@
home3 = yield self.transactionUnderTest().addressbookHomeWithUID(
"home3", create=True
)
- self.assertIdentical((yield home3.addressbookWithName("addressbook")), None)
+ ab = yield home3.addressbookWithName("addressbook")
+ self.assertEquals((yield ab.addressbookObjects()), [])
@inlineCallbacks
@@ -882,11 +868,11 @@
user's via uid or name queries.
"""
home1 = yield self.homeUnderTest()
- home2 = yield self.transactionUnderTest().addressbookHomeWithUID(
+ home3 = yield self.transactionUnderTest().addressbookHomeWithUID(
"home3", create=True)
addressbook1 = yield home1.addressbookWithName("addressbook")
- addressbook2 = yield home2.addressbookWithName("addressbook")
- objects = list((yield (yield home2.addressbookWithName("addressbook")).addressbookObjects()))
+ addressbook2 = yield home3.addressbookWithName("addressbook")
+ objects = list((yield (yield home3.addressbookWithName("addressbook")).addressbookObjects()))
self.assertEquals(objects, [])
for resourceName in self.requirements['home1']['addressbook'].keys():
obj = yield addressbook1.addressbookObjectWithName(resourceName)
Modified: CalendarServer/branches/users/gaya/sharedgroups-3/txdav/carddav/datastore/test/test_sql.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups-3/txdav/carddav/datastore/test/test_sql.py 2013-05-10 22:09:44 UTC (rev 11166)
+++ CalendarServer/branches/users/gaya/sharedgroups-3/txdav/carddav/datastore/test/test_sql.py 2013-05-10 22:42:43 UTC (rev 11167)
@@ -594,8 +594,8 @@
# Remove address book object and check for no properties
adbk1 = yield self.addressbookUnderTest()
- abo = yield adbk1.objectWithName(name)
- yield abo.remove()
+ obj1 = yield adbk1.addressbookObjectWithName(name)
+ yield obj1.remove()
rows = yield _allWithID.on(self.transactionUnderTest(), resourceID=resourceID)
self.assertEqual(len(tuple(rows)), 0)
yield self.commit()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130510/e66cbf16/attachment-0001.html>
More information about the calendarserver-changes
mailing list