[CalendarServer-changes] [12907] CalendarServer/branches/users/sagen/move2who-3/txdav

source_changes at macosforge.org source_changes at macosforge.org
Fri Mar 14 07:19:26 PDT 2014


Revision: 12907
          http://trac.calendarserver.org//changeset/12907
Author:   sagen at apple.com
Date:     2014-03-14 07:19:26 -0700 (Fri, 14 Mar 2014)
Log Message:
-----------
More testing for directoryFromConfig

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

Modified: CalendarServer/branches/users/sagen/move2who-3/txdav/dps/client.py
===================================================================
--- CalendarServer/branches/users/sagen/move2who-3/txdav/dps/client.py	2014-03-14 03:58:38 UTC (rev 12906)
+++ CalendarServer/branches/users/sagen/move2who-3/txdav/dps/client.py	2014-03-14 14:19:26 UTC (rev 12907)
@@ -54,9 +54,14 @@
 
 
 ## MOVE2WHO TODOs:
-## augmented service
-## configuration of aggregate services
-## hooking up delegates
+## realm from primary/user directory service
+## SACLs
+## Wiki
+## LDAP
+## Tests from old twistedcaldav/directory
+## Cmd line tools
+## Store based directory service (records in the store, i.e. locations/resources)
+## Separate store for DPS (augments and delegates separate from calendar data)
 ## calverify needs deferreds, including:
 ##    component.normalizeCalendarUserAddresses
 

Modified: CalendarServer/branches/users/sagen/move2who-3/txdav/who/test/test_util.py
===================================================================
--- CalendarServer/branches/users/sagen/move2who-3/txdav/who/test/test_util.py	2014-03-14 03:58:38 UTC (rev 12906)
+++ CalendarServer/branches/users/sagen/move2who-3/txdav/who/test/test_util.py	2014-03-14 14:19:26 UTC (rev 12907)
@@ -26,6 +26,13 @@
 from twisted.python.filepath import FilePath
 from txdav.who.augment import AugmentedDirectoryService
 from twext.who.aggregate import DirectoryService as AggregateDirectoryService
+from twext.who.xml import DirectoryService as XMLDirectoryService
+from txdav.who.delegates import (
+    DirectoryService as DelegateDirectoryService,
+    RecordType as DelegateRecordType
+)
+from twext.who.idirectory import RecordType
+from txdav.who.idirectory import RecordType as CalRecordType
 
 
 class StubStore(object):
@@ -91,6 +98,36 @@
 
         store = StubStore()
         service = directoryFromConfig(config, store=store)
+
+        # Inspect the directory service structure
         self.assertTrue(isinstance(service, AugmentedDirectoryService))
         self.assertTrue(isinstance(service._directory, AggregateDirectoryService))
         self.assertEquals(len(service._directory.services), 3)
+        self.assertTrue(
+            isinstance(service._directory.services[0], XMLDirectoryService)
+        )
+        self.assertEquals(
+            set(service._directory.services[0].recordTypes()),
+            set([RecordType.user, RecordType.group])
+        )
+        self.assertTrue(
+            isinstance(service._directory.services[1], XMLDirectoryService)
+        )
+        self.assertEquals(
+            set(service._directory.services[1].recordTypes()),
+            set([CalRecordType.location, CalRecordType.resource])
+        )
+        self.assertTrue(
+            isinstance(service._directory.services[2], DelegateDirectoryService)
+        )
+        self.assertEquals(
+            set(service._directory.services[2].recordTypes()),
+            set(
+                [
+                    DelegateRecordType.readDelegateGroup,
+                    DelegateRecordType.writeDelegateGroup,
+                    DelegateRecordType.readDelegatorGroup,
+                    DelegateRecordType.writeDelegatorGroup,
+                ]
+            )
+        )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140314/007ee7a9/attachment.html>


More information about the calendarserver-changes mailing list