[CMF-checkins] CVS: CMF/CMFCore/tests - test_MemberDataTool.py:1.2

Yvo Schubbe schubbe@web.de
Mon, 6 Jan 2003 16:04:35 -0500


Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv31457/CMFCore/tests

Added Files:
	test_MemberDataTool.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_MemberDataTool.py 1.1 => 1.2 ===
--- /dev/null	Mon Jan  6 16:04:35 2003
+++ CMF/CMFCore/tests/test_MemberDataTool.py	Mon Jan  6 16:04:33 2003
@@ -0,0 +1,41 @@
+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.MemberDataTool import MemberDataTool
+from Products.CMFCore.MemberDataTool import MemberData
+
+
+class MemberDataToolTests(TestCase):
+
+    def test_interface(self):
+        from Products.CMFCore.interfaces.portal_memberdata \
+                import portal_memberdata as IMemberDataTool
+        from Products.CMFCore.interfaces.portal_actions \
+                import ActionProvider as IActionProvider
+
+        verifyClass(IMemberDataTool, MemberDataTool)
+        verifyClass(IActionProvider, MemberDataTool)
+
+class MemberDataTests(TestCase):
+
+    def test_interface(self):
+        from Products.CMFCore.interfaces.portal_memberdata \
+                import MemberData as IMemberData
+
+        verifyClass(IMemberData, MemberData)
+
+
+def test_suite():
+    return TestSuite((
+        makeSuite( MemberDataToolTests ),
+        makeSuite( MemberDataTests ),
+        ))
+
+if __name__ == '__main__':
+    main(defaultTest='test_suite')