[CMF-checkins] CVS: CMF/CMFDefault/tests - test_Discussions.py:1.14

Yvo Schubbe schubbe@web.de
Mon, 6 Jan 2003 15:43:13 -0500


Update of /cvs-repository/CMF/CMFDefault/tests
In directory cvs.zope.org:/tmp/cvs-serv21765/CMFDefault/tests

Modified Files:
	test_Discussions.py 
Log Message:
Merged yuppie-collector096-branch:
- Cleaned up Interfaces and API Help. (Collector #96)
- Removed deprecated 'register' module and interface.

=== CMF/CMFDefault/tests/test_Discussions.py 1.13 => 1.14 ===
--- CMF/CMFDefault/tests/test_Discussions.py:1.13	Wed Dec 11 17:21:39 2002
+++ CMF/CMFDefault/tests/test_Discussions.py	Mon Jan  6 15:43:10 2003
@@ -1,5 +1,11 @@
+from unittest import TestCase, TestSuite, makeSuite, main
+
 import Zope
-from unittest import TestSuite, makeSuite, main
+try:
+    from Interface.Verify import verifyClass
+except ImportError:
+    # for Zope versions before 2.6.0
+    from Interface import verify_class_implementation as verifyClass
 
 from Products.CMFCore.tests.base.testcase import \
      SecurityTest
@@ -12,12 +18,38 @@
 
 from Products.CMFCore.CatalogTool import CatalogTool
 from Products.CMFCore.TypesTool import TypesTool
+from Products.CMFCore.URLTool import URLTool
 from Products.CMFCore.WorkflowTool import WorkflowTool
 
-from Products.CMFDefault.DiscussionTool import \
-     DiscussionTool, DiscussionNotAllowed
+from Products.CMFDefault.DiscussionTool import DiscussionTool
+from Products.CMFDefault.DiscussionTool import DiscussionNotAllowed
+from Products.CMFDefault.DiscussionItem import DiscussionItem
+from Products.CMFDefault.DiscussionItem import DiscussionItemContainer
+
+
+class DiscussionItemTests(TestCase):
+
+    def test_interface(self):
+        from Products.CMFCore.interfaces.Dynamic \
+                import DynamicType as IDynamicType
+        from Products.CMFCore.interfaces.Contentish \
+                import Contentish as IContentish
+        from Products.CMFCore.interfaces.Discussions \
+                import DiscussionResponse as IDiscussionResponse
+
+        verifyClass(IDynamicType, DiscussionItem)
+        verifyClass(IContentish, DiscussionItem)
+        verifyClass(IDiscussionResponse, DiscussionItem)
+
+
+class DiscussionItemContainerTests(TestCase):
+
+    def test_interface(self):
+        from Products.CMFCore.interfaces.Discussions \
+                import Discussable as IDiscussable
+
+        verifyClass(IDiscussable, DiscussionItemContainer)
 
-from Products.CMFCore.URLTool import URLTool
 
 class DiscussionTests( SecurityTest ):
 
@@ -200,6 +232,8 @@
 
 def test_suite():
     return TestSuite((
+        makeSuite( DiscussionItemTests ),
+        makeSuite( DiscussionItemContainerTests ),
         makeSuite( DiscussionTests ),
         ))