Commit 29047347 authored by wenjie.zheng's avatar wenjie.zheng

ERP5TypeTestCase.py: minor improvements.

parent 27ba82bc
...@@ -926,9 +926,9 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin): ...@@ -926,9 +926,9 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
def dynamicWorkflowConversion(self): def dynamicWorkflowConversion(self):
# Converting DCWorkflow dynamically # Converting DCWorkflow dynamically
workflow_tool = self.portal.portal_workflow workflow_tool = self.portal._getOb('portal_workflow', None)
type_value_list = [] type_value_list = []
if workflow_tool.getPortalType() == "Workflow Tool": if workflow_tool and workflow_tool.getPortalType() == "Workflow Tool":
type_workflow_dict = workflow_tool.getChainsByType() type_workflow_dict = workflow_tool.getChainsByType()
for workflow_id in workflow_tool.objectIds(): for workflow_id in workflow_tool.objectIds():
start = DateTime() start = DateTime()
...@@ -937,7 +937,7 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin): ...@@ -937,7 +937,7 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
'testing_workflow_backup', 'testing_interaction_workflow_backup']: 'testing_workflow_backup', 'testing_interaction_workflow_backup']:
continue continue
workflow = workflow_tool._getOb(workflow_id) workflow = workflow_tool._getOb(workflow_id)
if workflow.getPortalType() not in ['Workflow', 'Interaction Workflow']: if workflow.getPortalType() not in ['Workflow', 'Interaction Workflow', 'Configuration Workflow']:
new_workflow = workflow_tool.dc_workflow_asERP5Object(workflow_tool, workflow, temp=0) new_workflow = workflow_tool.dc_workflow_asERP5Object(workflow_tool, workflow, temp=0)
for ptype_id in type_workflow_dict: for ptype_id in type_workflow_dict:
ptype = self.portal.portal_types._getOb(ptype_id, None) ptype = self.portal.portal_types._getOb(ptype_id, None)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment