Commit 3f6072ac authored by Romain Courteaud's avatar Romain Courteaud

Remove workflow chains before removing portal type.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18741 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7b90515c
......@@ -84,6 +84,14 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
def beforeTearDown(self):
"""Remove objects created tests."""
pw = self.getWorkflowTool()
cbt = pw._chains_by_type
props = {}
if cbt is not None:
for id, wf_ids in cbt.items():
if id != "Geek Object":
props['chain_%s' % id] = ', '.join(wf_ids)
pw.manage_changeWorkflows('', props=props)
if 'erp5_geek' in self.getSkinsTool().objectIds():
self.getSkinsTool().manage_delObjects(['erp5_geek'])
ps = self.getSkinsTool()
......@@ -103,14 +111,6 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
self.getWorkflowTool().manage_delObjects(['geek_workflow'])
if 'custom_geek_workflow' in self.getWorkflowTool().objectIds():
self.getWorkflowTool().manage_delObjects(['custom_geek_workflow'])
pw = self.getWorkflowTool()
cbt = pw._chains_by_type
props = {}
if cbt is not None:
for id, wf_ids in cbt.items():
if id != "Geek Object":
props['chain_%s' % id] = ','.join(wf_ids)
pw.manage_changeWorkflows('', props=props)
get_transaction().commit()
self._ignore_log_errors()
......
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