[CMF-checkins] CVS: CMF/CMFCore/tests - test_DiscussionTool.py:1.2 test_DynamicType.py:1.2
Yvo Schubbe
schubbe@web.de
Mon, 6 Jan 2003 16:04:27 -0500
Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv31379/CMFCore/tests
Added Files:
test_DiscussionTool.py test_DynamicType.py
Log Message:
Merged yuppie-collector096-branch:
- Cleaned up Interfaces and API Help. (Collector #96)
- Removed deprecated 'register' module and interface.
=== CMF/CMFCore/tests/test_DiscussionTool.py 1.1 => 1.2 ===
--- /dev/null Mon Jan 6 16:04:26 2003
+++ CMF/CMFCore/tests/test_DiscussionTool.py Mon Jan 6 16:04:24 2003
@@ -0,0 +1,39 @@
+from unittest import TestCase, TestSuite, makeSuite, main
+
+import Zope
+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.DiscussionTool import DiscussionTool
+from Products.CMFCore.DiscussionTool import OldDiscussable
+
+
+class DiscussionToolTests(TestCase):
+
+ def test_interface(self):
+ from Products.CMFCore.interfaces.portal_discussion \
+ import oldstyle_portal_discussion as IOldstyleDiscussionTool
+
+ verifyClass(IOldstyleDiscussionTool, DiscussionTool)
+
+
+class OldDiscussableTests(TestCase):
+
+ def test_interface(self):
+ from Products.CMFCore.interfaces.Discussions \
+ import OldDiscussable as IOldDiscussable
+
+ verifyClass(IOldDiscussable, OldDiscussable)
+
+
+def test_suite():
+ return TestSuite((
+ makeSuite( DiscussionToolTests ),
+ makeSuite( OldDiscussableTests ),
+ ))
+
+if __name__ == '__main__':
+ main(defaultTest='test_suite')
=== CMF/CMFCore/tests/test_DynamicType.py 1.1 => 1.2 ===
--- /dev/null Mon Jan 6 16:04:26 2003
+++ CMF/CMFCore/tests/test_DynamicType.py Mon Jan 6 16:04:24 2003
@@ -0,0 +1,28 @@
+from unittest import TestCase, TestSuite, makeSuite, main
+
+import Zope
+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.DynamicType import DynamicType
+
+
+class DynamicTypeTests(TestCase):
+
+ def test_interface(self):
+ from Products.CMFCore.interfaces.Dynamic \
+ import DynamicType as IDynamicType
+
+ verifyClass(IDynamicType, DynamicType)
+
+
+def test_suite():
+ return TestSuite((
+ makeSuite( DynamicTypeTests ),
+ ))
+
+if __name__ == '__main__':
+ main(defaultTest='test_suite')