[CMF-checkins] CVS: CMF/CMFCore/tests - test_TypesTool.py:1.18

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


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

Modified Files:
	test_TypesTool.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_TypesTool.py 1.17 => 1.18 ===
--- CMF/CMFCore/tests/test_TypesTool.py:1.17	Sun Aug  4 18:59:12 2002
+++ CMF/CMFCore/tests/test_TypesTool.py	Mon Jan  6 15:41:10 2003
@@ -1,6 +1,12 @@
-import Zope
 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.TypesTool import\
      FactoryTypeInformation as FTI,\
      ScriptableTypeInformation as STI,\
@@ -77,6 +83,16 @@
         self.failUnless(meta_types.has_key('Scriptable Type Information'))
         self.failUnless(meta_types.has_key('Factory-based Type Information'))
 
+    def test_interface(self):
+        from Products.CMFCore.interfaces.portal_types \
+                import portal_types as ITypesTool
+        from Products.CMFCore.interfaces.portal_actions \
+                import ActionProvider as IActionProvider
+
+        verifyClass(ITypesTool, TypesTool)
+        verifyClass(IActionProvider, TypesTool)
+
+
 class TypeInfoTests( TestCase ):
     
     def test_construction( self ):
@@ -231,7 +247,7 @@
         
         action = ti.getActionById( 'slot' )
         self.assertEqual( action, 'foo_slot' )
-        
+
 
 class FTIDataTests( TypeInfoTests ):
 
@@ -250,6 +266,12 @@
         self.assertEqual( ti.product, 'FooProduct' )
         self.assertEqual( ti.factory, 'addFoo' )
 
+    def test_interface(self):
+        from Products.CMFCore.interfaces.portal_types \
+                import ContentTypeInformation as ITypeInformation
+
+        verifyClass(ITypeInformation, FTI)
+        
 
 class STIDataTests( TypeInfoTests ):
 
@@ -267,6 +289,13 @@
                                )
         self.assertEqual( ti.permission, 'Add Foos' )
         self.assertEqual( ti.constructor_path, 'foo_add' )
+
+    def test_interface(self):
+        from Products.CMFCore.interfaces.portal_types \
+                import ContentTypeInformation as ITypeInformation
+
+        verifyClass(ITypeInformation, STI)
+        
 
 class FTIConstructionTests( TestCase ):