[CMF-checkins] CVS: Products/CMFCore/tests -
test_WorkflowTool.py:1.10.2.3
Tres Seaver
tseaver at palladion.com
Tue Jul 5 23:27:52 EDT 2005
Update of /cvs-repository/Products/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv9882/CMFCore/tests
Modified Files:
Tag: CMF-1_5-branch
test_WorkflowTool.py
Log Message:
- Add test and fix for deprecated 'getActionsFor' API, to resolve
AttributeError due so similarly-deprecated WorkflowInformation
(Collector #360).
=== Products/CMFCore/tests/test_WorkflowTool.py 1.10.2.2 => 1.10.2.3 ===
--- Products/CMFCore/tests/test_WorkflowTool.py:1.10.2.2 Wed Jun 15 06:14:29 2005
+++ Products/CMFCore/tests/test_WorkflowTool.py Tue Jul 5 23:27:51 2005
@@ -292,6 +292,21 @@
self.failUnless( 'dummy' in vars.keys() )
self.failUnless( 'a: dummy' in vars.values() )
+ def test_getActionsFor( self ):
+
+ import warnings
+
+ # Collector #360: Test AtttributeError in deprecated API :(
+ tool = self._makeWithTypesAndChain()
+ dummy = DummyContent( 'dummy' )
+
+ warnings.filterwarnings("ignore", category=DeprecationWarning)
+ try:
+ actions = tool.getActionsFor( dummy )
+ finally:
+ warnings.resetwarnings()
+ self.assertEqual( len( actions ), 0 )
+
def test_getInfoFor( self ):
tool = self._makeWithTypesAndChain()
More information about the CMF-checkins
mailing list