[Erp5-report] r34363 aurel - /erp5/trunk/products/ERP5/tests/testBusinessTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Apr 8 11:20:07 CEST 2010
Author: aurel
Date: Thu Apr 8 11:20:06 2010
New Revision: 34363
URL: http://svn.erp5.org?rev=34363&view=rev
Log:
add a sequence to test that the '-' of workflow is well taken into
account in bt installation -fixed bug #1702
Modified:
erp5/trunk/products/ERP5/tests/testBusinessTemplate.py
Modified: erp5/trunk/products/ERP5/tests/testBusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testBusinessTemplate.py?rev=34363&r1=34362&r2=34363&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testBusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testBusinessTemplate.py [utf8] Thu Apr 8 11:20:06 2010
@@ -1266,7 +1266,8 @@
cbt = pw._chains_by_type
if cbt is not None:
for id, wf_ids in cbt.items():
- self.failUnless(id!="Geek Object")
+ if id == "Geek Object":
+ self.assertEqual(len(wf_ids), 0)
def stepCheckWorkflowChainExists(self, sequence=None, sequence_list=None, **kw):
"""
@@ -1299,6 +1300,15 @@
bt = sequence.get('current_bt', None)
self.failUnless(bt is not None)
wf_chain_ids = ['Geek Object | %s' % sequence.get('workflow_id', '')]
+ bt.edit(template_portal_type_workflow_chain_list=wf_chain_ids)
+
+ def stepAddRemovedWorkflowChainToBusinessTemplate(self, sequence=None, sequence_list=None, **kw):
+ """
+ Add workflow to business template
+ """
+ bt = sequence.get('current_bt', None)
+ self.failUnless(bt is not None)
+ wf_chain_ids = ['Geek Object | -%s' % sequence.get('workflow_id', '')]
bt.edit(template_portal_type_workflow_chain_list=wf_chain_ids)
def stepRemoveWorkflow(self, sequence=None, sequence_list=None, **kw):
@@ -3141,6 +3151,75 @@
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self, quiet=quiet)
+ def test_043_BusinessTemplateWithWorkflowChainRemoved(self, quiet=quiet, run=run_all_test):
+ if not run: return
+ if not quiet:
+ message = 'Test Business Template With Remove Of Workflow Chain'
+ ZopeTestCase._print('\n%s ' % message)
+ LOG('Testing... ', 0, message)
+ sequence_list = SequenceList()
+ sequence_string = '\
+ CreatePortalType \
+ CreateWorkflow \
+ CreateNewBusinessTemplate \
+ UseExportBusinessTemplate \
+ AddWorkflowToBusinessTemplate \
+ AddWorkflowChainToBusinessTemplate \
+ CheckModifiedBuildingState \
+ CheckNotInstalledInstallationState \
+ BuildBusinessTemplate \
+ CheckBuiltBuildingState \
+ CheckNotInstalledInstallationState \
+ CheckObjectPropertiesInBusinessTemplate \
+ SaveBusinessTemplate \
+ CheckBuiltBuildingState \
+ CheckNotInstalledInstallationState \
+ RemoveWorkflow \
+ RemoveBusinessTemplate \
+ RemoveAllTrashBins \
+ ImportBusinessTemplate \
+ UseImportBusinessTemplate \
+ CheckBuiltBuildingState \
+ CheckNotInstalledInstallationState \
+ InstallBusinessTemplate \
+ Tic \
+ CheckInstalledInstallationState \
+ CheckBuiltBuildingState \
+ CheckNoTrashBin \
+ CheckSkinsLayers \
+ CheckWorkflowExists \
+ CheckWorkflowChainExists \
+ CreateSecondBusinessTemplate \
+ UseSecondBusinessTemplate \
+ AddWorkflowToBusinessTemplate \
+ AddRemovedWorkflowChainToBusinessTemplate \
+ CheckModifiedBuildingState \
+ CheckNotInstalledInstallationState \
+ BuildBusinessTemplate \
+ CheckBuiltBuildingState \
+ CheckNotInstalledInstallationState \
+ CheckObjectPropertiesInBusinessTemplate \
+ SaveBusinessTemplate \
+ CheckBuiltBuildingState \
+ CheckNotInstalledInstallationState \
+ RemoveBusinessTemplate \
+ RemoveAllTrashBins \
+ ImportBusinessTemplate \
+ UseImportBusinessTemplate \
+ CheckBuiltBuildingState \
+ CheckNotInstalledInstallationState \
+ Tic \
+ InstallWithRemoveCheckedBusinessTemplate \
+ Tic \
+ CheckInstalledInstallationState \
+ CheckBuiltBuildingState \
+ CheckSkinsLayers \
+ CheckWorkflowExists \
+ CheckWorkflowChainRemoved \
+ '
+ sequence_list.addSequenceString(sequence_string)
+ sequence_list.play(self, quiet=quiet)
+
# test of module
def test_05_BusinessTemplateWithModule(self, quiet=quiet, run=run_all_test):
if not run: return
More information about the Erp5-report
mailing list