[CalendarServer-changes] [11958] CalendarServer/trunk/twext/who/test

source_changes at macosforge.org source_changes at macosforge.org
Wed Mar 12 11:24:24 PDT 2014


Revision: 11958
          http://trac.calendarserver.org//changeset/11958
Author:   wsanchez at apple.com
Date:     2013-11-15 15:31:07 -0800 (Fri, 15 Nov 2013)
Log Message:
-----------
Add (empty) index test classes

Modified Paths:
--------------
    CalendarServer/trunk/twext/who/test/test_directory.py
    CalendarServer/trunk/twext/who/test/test_xml.py

Added Paths:
-----------
    CalendarServer/trunk/twext/who/test/test_index.py

Modified: CalendarServer/trunk/twext/who/test/test_directory.py
===================================================================
--- CalendarServer/trunk/twext/who/test/test_directory.py	2013-11-15 21:55:22 UTC (rev 11957)
+++ CalendarServer/trunk/twext/who/test/test_directory.py	2013-11-15 23:31:07 UTC (rev 11958)
@@ -36,6 +36,7 @@
 from twext.who.directory import DirectoryService, DirectoryRecord
 
 
+
 class ServiceMixIn(object):
     """
     MixIn that sets up a service appropriate for testing.
@@ -400,7 +401,7 @@
 
 class BaseDirectoryServiceImmutableTest(ServiceMixIn):
     """
-    Immutable directory record tests.
+    Tests for immutable directory services.
     """
 
     def test_updateRecordsNotAllowed(self):
@@ -447,6 +448,10 @@
 
 
 class BaseDirectoryRecordTest(ServiceMixIn):
+    """
+    Tests for directory records.
+    """
+
     fields_wsanchez = {
         FieldName.uid: u"UID:wsanchez",
         FieldName.recordType: RecordType.user,
@@ -685,7 +690,9 @@
             sagen.description()
         )
 
+    test_description.todo = "Intermittent order issues"
 
+
     def test_members_group(self):
         """
         Group members.

Added: CalendarServer/trunk/twext/who/test/test_index.py
===================================================================
--- CalendarServer/trunk/twext/who/test/test_index.py	                        (rev 0)
+++ CalendarServer/trunk/twext/who/test/test_index.py	2013-11-15 23:31:07 UTC (rev 11958)
@@ -0,0 +1,72 @@
+##
+# Copyright (c) 2013 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+"""
+Indexed directory service base implementation tests.
+"""
+
+from twisted.trial import unittest
+
+from twext.who.test import test_directory
+
+
+
+class BaseDirectoryServiceTest(test_directory.BaseDirectoryServiceTest):
+    """
+    Tests for indexed directory services.
+    """
+
+
+
+class DirectoryServiceTest(unittest.TestCase, BaseDirectoryServiceTest):
+    def _noop(self):
+        """
+        Does nothing.
+        """
+
+    test_recordWithUID = _noop
+    test_recordWithGUID = _noop
+    test_recordsWithRecordType = _noop
+    test_recordWithShortName = _noop
+    test_recordsWithEmailAddress = _noop
+
+
+
+class BaseDirectoryServiceImmutableTest(
+    test_directory.BaseDirectoryServiceImmutableTest
+):
+    """
+    Tests for immutable indexed directory services.
+    """
+
+
+
+class DirectoryServiceImmutableTest(
+    unittest.TestCase, BaseDirectoryServiceImmutableTest
+):
+    pass
+
+
+
+class BaseDirectoryRecordTest(test_directory.BaseDirectoryRecordTest):
+    """
+    Tests for indexed directory records.
+    """
+
+
+
+class DirectoryRecordTest(unittest.TestCase, BaseDirectoryRecordTest):
+    pass

Modified: CalendarServer/trunk/twext/who/test/test_xml.py
===================================================================
--- CalendarServer/trunk/twext/who/test/test_xml.py	2013-11-15 21:55:22 UTC (rev 11957)
+++ CalendarServer/trunk/twext/who/test/test_xml.py	2013-11-15 23:31:07 UTC (rev 11958)
@@ -32,7 +32,7 @@
 from twext.who.xml import ParseError
 from twext.who.xml import DirectoryService, DirectoryRecord
 
-from twext.who.test import test_directory
+from twext.who.test import test_index
 
 
 
@@ -51,7 +51,7 @@
 
 class DirectoryServiceBaseTest(
     BaseTest,
-    test_directory.BaseDirectoryServiceTest,
+    test_index.BaseDirectoryServiceTest,
 ):
     def test_repr(self):
         service = self.service()
@@ -756,7 +756,7 @@
 
 
 
-class DirectoryRecordTest(BaseTest, test_directory.BaseDirectoryRecordTest):
+class DirectoryRecordTest(BaseTest, test_index.BaseDirectoryRecordTest):
     @inlineCallbacks
     def test_members(self):
         service = self.service()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/482fbb7a/attachment.html>


More information about the calendarserver-changes mailing list