[CMF-checkins] CVS: CMF/CMFCore/tests - test_CatalogTool.py:1.3

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


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

Modified Files:
	test_CatalogTool.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_CatalogTool.py 1.2 => 1.3 ===
--- CMF/CMFCore/tests/test_CatalogTool.py:1.2	Fri Feb 15 14:45:33 2002
+++ CMF/CMFCore/tests/test_CatalogTool.py	Mon Jan  6 15:40:46 2003
@@ -1,11 +1,28 @@
-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.tests.base.dummy import \
      DummyContent
 
+from Products.CMFCore.CatalogTool import IndexableObjectWrapper
 from Products.CMFCore.CatalogTool import CatalogTool
 
+
+class IndexableObjectWrapperTests(TestCase):
+
+    def test_interface(self):
+        from Products.CMFCore.interfaces.portal_catalog \
+                import IndexableObjectWrapper as IIndexableObjectWrapper
+
+        verifyClass(IIndexableObjectWrapper, IndexableObjectWrapper)
+
+
 class CatalogToolTests( TestCase ):
 
     def test_processActions( self ):
@@ -19,8 +36,19 @@
         tool.catalog_object( dummy, '/dummy' )
         tool.catalog_object( dummy, '/dummy', [ 'SearchableText' ] )
 
+    def test_interface(self):
+        from Products.CMFCore.interfaces.portal_catalog \
+                import portal_catalog as ICatalogTool
+        from Products.CMFCore.interfaces.portal_actions \
+                import ActionProvider as IActionProvider
+
+        verifyClass(ICatalogTool, CatalogTool)
+        verifyClass(IActionProvider, CatalogTool)
+
+
 def test_suite():
     return TestSuite((
+        makeSuite( IndexableObjectWrapperTests ),
         makeSuite( CatalogToolTests ),
         ))