[CalendarServer-changes] [13018] CalendarServer/branches/users/sagen/move2who-4/txdav/who/test/ test_util.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Mar 27 20:22:54 PDT 2014


Revision: 13018
          http://trac.calendarserver.org//changeset/13018
Author:   sagen at apple.com
Date:     2014-03-27 20:22:54 -0700 (Thu, 27 Mar 2014)
Log Message:
-----------
Fix test_util.py

Modified Paths:
--------------
    CalendarServer/branches/users/sagen/move2who-4/txdav/who/test/test_util.py

Modified: CalendarServer/branches/users/sagen/move2who-4/txdav/who/test/test_util.py
===================================================================
--- CalendarServer/branches/users/sagen/move2who-4/txdav/who/test/test_util.py	2014-03-28 02:08:34 UTC (rev 13017)
+++ CalendarServer/branches/users/sagen/move2who-4/txdav/who/test/test_util.py	2014-03-28 03:22:54 UTC (rev 13018)
@@ -34,6 +34,10 @@
 )
 from twext.who.idirectory import RecordType
 from txdav.who.idirectory import RecordType as CalRecordType
+from txdav.who.wiki import (
+    DirectoryService as WikiDirectoryService,
+    RecordType as WikiRecordType,
+)
 
 
 class StubStore(object):
@@ -71,6 +75,13 @@
         config = ConfigDict(
             {
                 "DataRoot": self.dataRoot,
+                "Authentication": {
+                    "Wiki": {
+                        "Enabled": True,
+                        "CollabHost": "localhost",
+                        "CollabPort": 4444,
+                    },
+                },
                 "DirectoryService": {
                     "Enabled": True,
                     "type": "XML",
@@ -104,7 +115,7 @@
         # Inspect the directory service structure
         self.assertTrue(isinstance(service, AugmentedDirectoryService))
         self.assertTrue(isinstance(service._directory, AggregateDirectoryService))
-        self.assertEquals(len(service._directory.services), 3)
+        self.assertEquals(len(service._directory.services), 4)
         self.assertTrue(
             isinstance(service._directory.services[0], XMLDirectoryService)
         )
@@ -139,7 +150,15 @@
                 ]
             )
         )
+        self.assertTrue(
+            isinstance(service._directory.services[3], WikiDirectoryService)
+        )
+        self.assertEquals(
+            set(service._directory.services[3].recordTypes()),
+            set([WikiRecordType.macOSXServerWiki])
+        )
 
+
         # And make sure it's functional:
         record = yield service.recordWithUID("group07")
         self.assertEquals(record.fullNames, [u'Group 07'])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140327/38c1795d/attachment.html>


More information about the calendarserver-changes mailing list