Commit 0ef9c86d authored by wenjie.zheng's avatar wenjie.zheng

ERP5TypeTestCase.py: move dynamicalWorkflowConvertion to the end of Site...

ERP5TypeTestCase.py: move dynamicalWorkflowConvertion to the end of Site creation, so the speed grains a great improvement.
parent ac311b9b
......@@ -875,7 +875,6 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
light_install=True,
quiet=True):
template_tool = self.portal.portal_templates
workflow_tool = self.portal.portal_workflow
update_business_templates = os.environ.get('update_business_templates') is not None
BusinessTemplate_getModifiedObject = aq_base(
getattr(self.portal, 'BusinessTemplate_getModifiedObject', None))
......@@ -918,7 +917,9 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
if not quiet:
ZopeTestCase._print('done (%.3fs)\n' % (time.time() - start))
def dynamicalWorkflowConvertion(self):
# Converting DCWorkflow dynamically
workflow_tool = self.portal.portal_workflow
if workflow_tool.getPortalType() != "Workflow Tool":
raise NotImplementedError("Workflow tool has not been converted!")
for workflow_id in workflow_tool:
......@@ -1036,7 +1037,6 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
user = uf.getUserById('ERP5TypeTestCase').__of__(uf)
self._callSetUpOnce()
# Enable reindexing
# Do hot reindexing # Does not work
if hot_reindexing:
......@@ -1045,7 +1045,7 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
portal.portal_types.resetDynamicDocumentsOnceAtTransactionBoundary()
self.tic(not quiet)
self.dynamicalWorkflowConvertion()
# Log out
if not quiet:
ZopeTestCase._print('Logout ... \n')
......
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