[CMF-checkins] CVS: CMF/CMFSetup/tests - test_workflow.py:1.16
Tres Seaver
tseaver at zope.com
Tue Jun 22 15:52:05 EDT 2004
Update of /cvs-repository/CMF/CMFSetup/tests
In directory cvs.zope.org:/tmp/cvs-serv20698/tests
Modified Files:
test_workflow.py
Log Message:
- Start testing DCWorkflow import.
=== CMF/CMFSetup/tests/test_workflow.py 1.15 => 1.16 ===
--- CMF/CMFSetup/tests/test_workflow.py:1.15 Tue Jun 22 14:08:05 2004
+++ CMF/CMFSetup/tests/test_workflow.py Tue Jun 22 15:52:05 2004
@@ -1948,6 +1948,34 @@
, ( WF_ID_NON % 3, )
)
+ def test_from_empty_dcworkflow( self ):
+
+ WF_ID = 'dcworkflow'
+ WF_TITLE = 'DC Workflow'
+ WF_INITIAL_STATE = 'closed'
+
+ site = self._initSite()
+ wf_tool = site.portal_workflow
+
+ wf_tool._default_chain = ()
+ wf_tool._chains_by_type.clear()
+ self.assertEqual( len( wf_tool.objectIds() ), 0 )
+
+ context = DummyImportContext( site )
+ context._files[ 'workflows.xml' ] = _NORMAL_TOOL_EXPORT
+ context._files[ 'workflows/dcworkflow/definition.xml'
+ ] = ( _NORMAL_WORKFLOW_EXPORT
+ % { 'workflow_id' : WF_ID
+ , 'title' : WF_TITLE
+ , 'initial_state' : WF_INITIAL_STATE
+ , 'workflow_filename' : WF_ID.replace(' ', '_')
+ } )
+
+ from Products.CMFSetup.workflow import importWorkflowTool
+ importWorkflowTool( context )
+
+ self.assertEqual( len( wf_tool.objectIds() ), 1 )
+
def test_suite():
return unittest.TestSuite((
unittest.makeSuite( WorkflowToolConfiguratorTests ),
More information about the CMF-checkins
mailing list