[CalendarServer-changes] [10686] CalendarServer/trunk/twext/who/test/test_xml.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Feb 11 14:34:49 PST 2013
Revision: 10686
http://trac.calendarserver.org//changeset/10686
Author: wsanchez at apple.com
Date: 2013-02-11 14:34:49 -0800 (Mon, 11 Feb 2013)
Log Message:
-----------
Add tests for record removal.
Modified Paths:
--------------
CalendarServer/trunk/twext/who/test/test_xml.py
Modified: CalendarServer/trunk/twext/who/test/test_xml.py
===================================================================
--- CalendarServer/trunk/twext/who/test/test_xml.py 2013-02-11 21:55:48 UTC (rev 10685)
+++ CalendarServer/trunk/twext/who/test/test_xml.py 2013-02-11 22:34:49 UTC (rev 10686)
@@ -328,7 +328,31 @@
self.assertFailure(service.updateRecords((newRecord,)), NoSuchRecordError)
+ @inlineCallbacks
+ def test_removeRecord(self):
+ service = self._testService()
+ yield service.removeRecords(("__wsanchez__",))
+
+ # Verify change is present immediately
+ self.assertEquals((yield service.recordWithUID("__wsanchez__")), None)
+
+ # Verify change is persisted
+ service.flush()
+ self.assertEquals((yield service.recordWithUID("__wsanchez__")), None)
+
+ test_removeRecord.todo = "Not implemented."
+
+
+ def test_removeRecordNoExist(self):
+ service = self._testService()
+
+ return service.removeRecords(("__plugh__",))
+
+ test_removeRecordNoExist.todo = "Not implemented."
+
+
+
class DirectoryRecordTest(BaseTest, test_directory.DirectoryRecordTest):
@inlineCallbacks
def test_members(self):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130211/31420723/attachment.html>
More information about the calendarserver-changes
mailing list