[CalendarServer-changes] [13418] twext/trunk/twext/who/test/test_xml.py
source_changes at macosforge.org
source_changes at macosforge.org
Fri May 2 18:52:29 PDT 2014
Revision: 13418
http://trac.calendarserver.org//changeset/13418
Author: sagen at apple.com
Date: 2014-05-02 18:52:29 -0700 (Fri, 02 May 2014)
Log Message:
-----------
Test for xml file missing
Modified Paths:
--------------
twext/trunk/twext/who/test/test_xml.py
Modified: twext/trunk/twext/who/test/test_xml.py
===================================================================
--- twext/trunk/twext/who/test/test_xml.py 2014-05-03 01:49:59 UTC (rev 13417)
+++ twext/trunk/twext/who/test/test_xml.py 2014-05-03 01:52:29 UTC (rev 13418)
@@ -888,7 +888,26 @@
)
+class MissingFileTest(unittest.TestCase):
+ @inlineCallbacks
+ def test_missingFile(self):
+ service = DirectoryService(FilePath(self.mktemp()))
+ record = yield service.recordWithUID(u"missing")
+ self.assertEquals(record, None)
+
+ fields = {
+ service.fieldName.uid: u"notmissing",
+ service.fieldName.recordType: service.recordType.user,
+ }
+
+ updatedRecord = DirectoryRecord(service, fields)
+ yield service.updateRecords((updatedRecord,))
+ record = yield service.recordWithUID(u"notmissing")
+ self.assertEquals(record.uid, u"notmissing")
+
+
+
class QueryMixIn(object):
def query(
self,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140502/1ffaa7b7/attachment.html>
More information about the calendarserver-changes
mailing list