[CalendarServer-changes] [1229]
CalendarServer/branches/users/dreid/tap-tests/twistedcaldav/test/
test_tap.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Feb 21 13:28:46 PST 2007
Revision: 1229
http://trac.macosforge.org/projects/calendarserver/changeset/1229
Author: dreid at apple.com
Date: 2007-02-21 13:28:46 -0800 (Wed, 21 Feb 2007)
Log Message:
-----------
Some simple assertions of the correct class, break up AuthWrapper test
Modified Paths:
--------------
CalendarServer/branches/users/dreid/tap-tests/twistedcaldav/test/test_tap.py
Modified: CalendarServer/branches/users/dreid/tap-tests/twistedcaldav/test/test_tap.py
===================================================================
--- CalendarServer/branches/users/dreid/tap-tests/twistedcaldav/test/test_tap.py 2007-02-21 19:52:23 UTC (rev 1228)
+++ CalendarServer/branches/users/dreid/tap-tests/twistedcaldav/test/test_tap.py 2007-02-21 21:28:46 UTC (rev 1229)
@@ -360,12 +360,11 @@
return service.services[0].args[1].protocolArgs['requestFactory']
- def test_AuthWrapper(self):
+ def test_AuthWrapperAllEnabled(self):
"""
- Test the configuration of the authentication wrapper.
+ Test the configuration of the authentication wrapper
+ when all schemes are enabled.
"""
- #XXX TODO FIXME: Break me up into two smaller tests.
-
self.config['Authentication']['Digest']['Enabled'] = True
self.config['Authentication']['Kerberos']['Enabled'] = True
self.config['Authentication']['Basic']['Enabled'] = True
@@ -389,6 +388,13 @@
self.assertEquals(len(expectedSchemes),
len(authWrapper.credentialFactories))
+ def test_AuthWrapperPartialEnabled(self):
+ """
+ Test that the expected credential factories exist when
+ only a partial set of authentication schemes is
+ enabled.
+ """
+
self.config['Authentication']['Basic']['Enabled'] = False
self.config['Authentication']['Kerberos']['Enabled'] = False
@@ -417,3 +423,35 @@
self.failUnless(isinstance(
site.resource,
LogWrapperResource))
+
+ def test_rootResource(self):
+ """
+ Test the root resource
+ """
+ site = self.getSite()
+ root = site.resource.resource.resource
+
+ self.failUnless(isinstance(root, CalDAVServiceMaker.rootResourceClass))
+
+ def test_principalResource(self):
+ """
+ Test the principal resource
+ """
+ site = self.getSite()
+ root = site.resource.resource.resource
+
+ self.failUnless(isinstance(
+ root.getChild('principals'),
+ CalDAVServiceMaker.principalResourceClass))
+
+ def test_calendarResource(self):
+ """
+ Test the calendar resource
+ """
+ site = self.getSite()
+ root = site.resource.resource.resource
+
+ self.failUnless(isinstance(
+ root.getChild('calendars'),
+ CalDAVServiceMaker.calendarResourceClass))
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070221/9ef1488e/attachment.html
More information about the calendarserver-changes
mailing list