[CMF-checkins] CVS: CMF/CMFDefault/tests - test_MetadataTool.py:1.6

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


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

Modified Files:
	test_MetadataTool.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_MetadataTool.py 1.5 => 1.6 ===
--- CMF/CMFDefault/tests/test_MetadataTool.py:1.5	Fri Jul  5 15:45:06 2002
+++ CMF/CMFDefault/tests/test_MetadataTool.py	Mon Jan  6 15:43:20 2003
@@ -1,6 +1,12 @@
+from unittest import TestCase, TestSuite, makeSuite, main
+
 import Zope
 from Acquisition import aq_base
-from unittest import TestCase, 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.CMFDefault.MetadataTool import \
      MetadataElementPolicy, MetadataTool, ElementSpec, \
@@ -357,6 +363,15 @@
 
         foo.setTitle( 'Foo title' )
         self.tool.validateMetadata( foo )
+
+    def test_interface(self):
+        from Products.CMFCore.interfaces.portal_metadata \
+                import portal_metadata as IMetadataTool
+        from Products.CMFCore.interfaces.portal_actions \
+                import ActionProvider as IActionProvider
+
+        verifyClass(IMetadataTool, MetadataTool)
+        verifyClass(IActionProvider, MetadataTool)
 
 
 def test_suite():