Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fix test_util.py

  • Loading branch information
m0rgen committed Mar 28, 2014
1 parent 0a740ae commit ef165d6391b28cafb7c2731e36dd153f2d16b85b
Showing with 20 additions and 1 deletion.
  1. +20 −1 txdav/who/test/test_util.py
@@ -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 @@ def test_directoryFromConfig(self):
config = ConfigDict(
{
"DataRoot": self.dataRoot,
"Authentication": {
"Wiki": {
"Enabled": True,
"CollabHost": "localhost",
"CollabPort": 4444,
},
},
"DirectoryService": {
"Enabled": True,
"type": "XML",
@@ -104,7 +115,7 @@ def test_directoryFromConfig(self):
# 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,6 +150,14 @@ def test_directoryFromConfig(self):
]
)
)
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")

0 comments on commit ef165d6

Please sign in to comment.
You can’t perform that action at this time.