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

Yvo Schubbe cvs-admin at zope.org
Sun Dec 7 15:27:31 EST 2003


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

Modified Files:
	test_CatalogTool.py 
Log Message:
Oops! Fixed backwards compatibility.


=== CMF/CMFCore/tests/test_CatalogTool.py 1.4 => 1.5 ===
--- CMF/CMFCore/tests/test_CatalogTool.py:1.4	Sun Dec  7 12:31:22 2003
+++ CMF/CMFCore/tests/test_CatalogTool.py	Sun Dec  7 15:27:29 2003
@@ -45,13 +45,18 @@
     def test_interface(self):
         from Products.CMFCore.interfaces.portal_catalog \
                 import portal_catalog as ICatalogTool
-        from Products.ZCatalog.IZCatalog import IZCatalog
         from Products.CMFCore.interfaces.portal_actions \
                 import ActionProvider as IActionProvider
 
         verifyClass(ICatalogTool, CatalogTool)
-        verifyClass(IZCatalog, CatalogTool)
         verifyClass(IActionProvider, CatalogTool)
+
+        try:
+            from Products.ZCatalog.IZCatalog import IZCatalog
+            verifyClass(IZCatalog, CatalogTool)
+        except ImportError:
+            # for Zope versions before 2.6.0
+            pass
 
 
 def test_suite():




More information about the CMF-checkins mailing list