[CalendarServer-changes] [4648] CalendarServer/branches/more-deferreds-3/twistedcaldav/directory/ test/util.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue Oct 27 17:30:40 PDT 2009
Revision: 4648
http://trac.macosforge.org/projects/calendarserver/changeset/4648
Author: glyph at apple.com
Date: 2009-10-27 17:30:36 -0700 (Tue, 27 Oct 2009)
Log Message:
-----------
for my own sanity, make use of the interface declaration to add a test that checks that it's adhered to
Modified Paths:
--------------
CalendarServer/branches/more-deferreds-3/twistedcaldav/directory/test/util.py
Modified: CalendarServer/branches/more-deferreds-3/twistedcaldav/directory/test/util.py
===================================================================
--- CalendarServer/branches/more-deferreds-3/twistedcaldav/directory/test/util.py 2009-10-27 20:50:29 UTC (rev 4647)
+++ CalendarServer/branches/more-deferreds-3/twistedcaldav/directory/test/util.py 2009-10-28 00:30:36 UTC (rev 4648)
@@ -1,3 +1,4 @@
+# -*- test-case-name: twistedcaldav.directory.test -*-
##
# Copyright (c) 2005-2009 Apple Inc. All rights reserved.
#
@@ -14,11 +15,14 @@
# limitations under the License.
##
+from zope.interface.verify import verifyObject
+
from twisted.internet.defer import inlineCallbacks
from twisted.trial.unittest import SkipTest
from twisted.cred.credentials import UsernamePassword
from twisted.web2.auth.digest import DigestedCredentials, calcResponse, calcHA1
+from twistedcaldav.directory.idirectory import IDirectoryService
from twistedcaldav.directory.directory import DirectoryService
from twistedcaldav.directory.directory import UnknownRecordTypeError
from twistedcaldav.test.util import TestCase
@@ -51,6 +55,15 @@
# For aggregator subclasses
recordTypePrefixes = ("",)
+
+ def test_isDirectoryService(self):
+ """
+ Does the directory service at least attempt to implement the methods
+ described by the interface?
+ """
+ self.failUnless(verifyObject(IDirectoryService, self.service()))
+
+
def test_realm(self):
"""
IDirectoryService.realm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20091027/da312d81/attachment.html>
More information about the calendarserver-changes
mailing list