[CMF-checkins] SVN: CMF/trunk/CMFCore/ - made sure all tests pass with 'disabled' z2interfaces

Yvo Schubbe y.2005- at wcm-solutions.de
Mon Oct 31 13:35:15 EST 2005


Log message for revision 39776:
  - made sure all tests pass with 'disabled' z2interfaces

Changed:
  U   CMF/trunk/CMFCore/exportimport/actions.py
  U   CMF/trunk/CMFCore/tests/test_OpaqueItems.py

-=-
Modified: CMF/trunk/CMFCore/exportimport/actions.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/actions.py	2005-10-31 17:28:24 UTC (rev 39775)
+++ CMF/trunk/CMFCore/exportimport/actions.py	2005-10-31 18:35:15 UTC (rev 39776)
@@ -23,9 +23,10 @@
 
 from Products.CMFCore.interfaces import IAction
 from Products.CMFCore.interfaces import IActionCategory
+from Products.CMFCore.interfaces import IActionProvider
 from Products.CMFCore.interfaces import IActionsTool
 from Products.CMFCore.interfaces.portal_actions \
-        import ActionProvider as IActionProvider
+        import ActionProvider as z2IActionProvider
 from Products.CMFCore.utils import getToolByName
 
 _SPECIAL_PROVIDERS = ('portal_actions', 'portal_types', 'portal_workflow')
@@ -123,7 +124,8 @@
         fragment = self._doc.createDocumentFragment()
 
         provider = getToolByName(self.context, provider_id)
-        if not IActionProvider.isImplementedBy(provider):
+        if not (IActionProvider.providedBy(provider) or
+                z2IActionProvider.isImplementedBy(provider)):
             return fragment
 
         if provider_id == 'portal_actions':

Modified: CMF/trunk/CMFCore/tests/test_OpaqueItems.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_OpaqueItems.py	2005-10-31 17:28:24 UTC (rev 39775)
+++ CMF/trunk/CMFCore/tests/test_OpaqueItems.py	2005-10-31 18:35:15 UTC (rev 39776)
@@ -19,8 +19,14 @@
 import Zope2
 Zope2.startup()
 
+from zope.interface import implements
+
+from Products.CMFCore.interfaces import ICallableOpaqueItem
+from Products.CMFCore.interfaces import ICallableOpaqueItemEvents
 from Products.CMFCore.interfaces.IOpaqueItems \
-    import ICallableOpaqueItem, ICallableOpaqueItemEvents
+        import ICallableOpaqueItem as z2ICallableOpaqueItem
+from Products.CMFCore.interfaces.IOpaqueItems \
+        import ICallableOpaqueItemEvents as z2ICallableOpaqueItemEvents
 from Products.CMFCore.PortalFolder import PortalFolder
 from Products.CMFCore.tests.base.dummy \
     import DummyContent as OriginalDummyContent
@@ -90,15 +96,17 @@
 class Marker(OpaqueBase):
     """ Opaque item without manage_after/before hookes but marked as callable
     """
+    implements(ICallableOpaqueItem)
     __implements__ = (
-        ICallableOpaqueItem,
+        z2ICallableOpaqueItem,
     )
 
 class Hooks(OpaqueBase):
     """ Opaque item with manage_after/before hooks but not marked as callable
     """
+    implements(ICallableOpaqueItemEvents)
     __implements__ = (
-        ICallableOpaqueItemEvents,
+        z2ICallableOpaqueItemEvents,
     )
     
     def manage_afterAdd(self, item, container):



More information about the CMF-checkins mailing list