[CalendarServer-changes] [14636] CalendarServer/trunk/txdav/common/datastore/test/test_trash.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Mar 30 12:12:10 PDT 2015
Revision: 14636
http://trac.calendarserver.org//changeset/14636
Author: sagen at apple.com
Date: 2015-03-30 12:12:10 -0700 (Mon, 30 Mar 2015)
Log Message:
-----------
This test is not ready
Modified Paths:
--------------
CalendarServer/trunk/txdav/common/datastore/test/test_trash.py
Modified: CalendarServer/trunk/txdav/common/datastore/test/test_trash.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/test/test_trash.py 2015-03-30 19:10:24 UTC (rev 14635)
+++ CalendarServer/trunk/txdav/common/datastore/test/test_trash.py 2015-03-30 19:12:10 UTC (rev 14636)
@@ -1893,111 +1893,7 @@
yield txn.commit()
- @inlineCallbacks
- def test_trashDuplicateUID(self):
- """
- Verify a duplicate uid is purged from the trash when a matching event
- is added to a collection
- """
- from twistedcaldav.stdconfig import config
- self.patch(config, "EnableTrashCollection", True)
-
- data1 = """BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
-BEGIN:VEVENT
-UID:5CE3B280-DBC9-4E8E-B0B2-996754020E5F
-DTSTART;TZID=America/Los_Angeles:20141108T093000
-DTEND;TZID=America/Los_Angeles:20141108T103000
-CREATED:20141106T192546Z
-DTSTAMP:20141106T192546Z
-RRULE:FREQ=DAILY
-SEQUENCE:0
-SUMMARY:repeating event
-TRANSP:OPAQUE
-END:VEVENT
-BEGIN:VEVENT
-UID:5CE3B280-DBC9-4E8E-B0B2-996754020E5F
-RECURRENCE-ID;TZID=America/Los_Angeles:20141111T093000
-DTSTART;TZID=America/Los_Angeles:20141111T110000
-DTEND;TZID=America/Los_Angeles:20141111T120000
-CREATED:20141106T192546Z
-DTSTAMP:20141106T192546Z
-SEQUENCE:0
-SUMMARY:repeating event
-TRANSP:OPAQUE
-END:VEVENT
-END:VCALENDAR
-"""
-
- txn = self.store.newTransaction()
-
- home = yield txn.calendarHomeWithUID("user01", create=True)
- collection = yield home.childWithName("calendar")
- # trash = yield home.getTrash(create=True)
-
- resource = yield collection.createObjectResourceWithName(
- "test.ics",
- Component.allFromString(data1)
- )
-
- newName = yield resource.toTrash()
-
- yield txn.commit()
- yield JobItem.waitEmpty(self.store.newTransaction, reactor, 60)
-
- txn = self.store.newTransaction()
-
- resource = yield collection.createObjectResourceWithName(
- "test.ics",
- Component.allFromString(data1)
- )
- yield txn.commit()
- yield JobItem.waitEmpty(self.store.newTransaction, reactor, 60)
-
- # # Verify it's in the trash
- # resource = yield self._getResource(txn, "user01", trash.name(), newName)
- # self.assertTrue((yield resource.isInTrash()))
- # trashed = yield resource.whenTrashed()
- # self.assertFalse(trashed is None)
-
- # # No objects in collection
- # resourceNames = yield self._getResourceNames(txn, "user01", "calendar")
- # self.assertEqual(len(resourceNames), 0)
-
- # # One object in trash
- # resourceNames = yield self._getResourceNames(txn, "user01", trash.name())
- # self.assertEqual(len(resourceNames), 1)
-
- # # Put back from trash
- # yield resource.fromTrash()
-
- # yield txn.commit()
- # yield JobItem.waitEmpty(self.store.newTransaction, reactor, 60)
-
- # txn = self.store.newTransaction()
-
- # # Not in trash
- # resource = yield self._getResource(txn, "user01", trash.name(), "")
- # self.assertTrue(resource is None)
-
-
- # # One object in collection
- # resourceNames = yield self._getResourceNames(txn, "user01", "calendar")
- # self.assertEqual(len(resourceNames), 1)
- # resource = yield self._getResource(txn, "user01", "calendar", newName)
- # self.assertFalse((yield resource.isInTrash()))
- # trashed = yield resource.whenTrashed()
- # self.assertTrue(trashed is None)
-
- # # No objects in trash
- # resourceNames = yield self._getResourceNames(txn, "user01", trash.name())
- # self.assertEqual(len(resourceNames), 0)
-
- # yield txn.commit()
-
-
@inlineCallbacks
def test_tool_emptyTrashForPrincipal(self):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150330/cf241eb8/attachment-0001.html>
More information about the calendarserver-changes
mailing list