[Erp5-report] r45129 luke - /erp5/trunk/products/ERP5/tests/testBusinessTemplate.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Apr 6 13:35:13 CEST 2011


Author: luke
Date: Wed Apr  6 13:35:13 2011
New Revision: 45129

URL: http://svn.erp5.org?rev=45129&view=rev
Log:
 - simplify test code

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=45129&r1=45128&r2=45129&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testBusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testBusinessTemplate.py [utf8] Wed Apr  6 13:35:13 2011
@@ -5877,28 +5877,6 @@ class TestBusinessTemplate(ERP5TypeTestC
     self.assertNotEqual(new_bt, newer_bt)
     self.assertEqual(newer_bt.getRevision(), second_revision)
 
-  def stepCreateCustomAnotherWorkflow(self, sequence=None, sequence_list=None, **kw):
-    """
-    Create a custom workflow
-    """
-    wf_id = 'custom_another_geek_workflow'
-    pw = self.getWorkflowTool()
-    addWorkflowByType(pw, WORKFLOW_TYPE, wf_id)
-    workflow = pw._getOb(wf_id, None)
-    self.failUnless(workflow is not None)
-    sequence.edit(workflow_id=workflow.getId())
-    cbt = pw._chains_by_type
-    props = {}
-    if cbt is not None:
-      for id, wf_ids in cbt.items():
-        props['chain_%s' % id] = ','.join(wf_ids)
-    key = 'chain_Geek Object'
-    if props.has_key(key):
-      props[key] = '%s,%s' % (props[key], wf_id)
-    else:
-      props[key] = wf_id
-    pw.manage_changeWorkflows('', props=props)
-
   def stepCreateCustomWorkflow(self, sequence=None, sequence_list=None, **kw):
     """
     Create a custom workflow
@@ -5935,22 +5913,6 @@ class TestBusinessTemplate(ERP5TypeTestC
                   description='custom bt for unit_test')
     sequence.edit(export_bt=template)
 
-  def stepCheckCustomAnotherWorkflowChain(self, sequence=None, sequence_list=None, **kw):
-    """
-    Check custom workflow chain
-    """
-    present = 0
-    pw = self.getWorkflowTool()
-    cbt = pw._chains_by_type
-    if cbt is not None:
-      for id, wf_ids in cbt.items():
-        if id == "Geek Object":
-          present = 1
-    self.assertEqual(present, 1)
-    self.assertSameSet(cbt['Geek Object'],
-                       ('geek_workflow', 'custom_geek_workflow',
-                         'custom_another_geek_workflow'))
-
   def stepCheckCustomWorkflowChain(self, sequence=None, sequence_list=None, **kw):
     """
     Check custom workflow chain
@@ -6176,9 +6138,9 @@ class TestBusinessTemplate(ERP5TypeTestC
     """Check that chains are correctly removed during update
     
     When previous business template defined that object is associated
-    with workflows A, B, C and that new one says that only A and B
-    associations are required check that after installing only A and B
-    will be on workflow chains."""
+    with workflows A, B and that new one says that only A association
+    is required check that after installing only A will be on workflow
+    chains."""
     sequence_list = SequenceList()
     sequence_string = '\
                        CreatePortalType \
@@ -6214,8 +6176,8 @@ class TestBusinessTemplate(ERP5TypeTestC
                        \
                        CreateCustomWorkflow \
                        CheckCustomWorkflowChain \
-                       AddWorkflowToBusinessTemplate \
-                       AddWorkflowChainToBusinessTemplate \
+                       AppendWorkflowToBusinessTemplate \
+                       AppendWorkflowChainToBusinessTemplate \
                        BuildBusinessTemplate \
                        SaveBusinessTemplate \
                        RemoveWorkflow \
@@ -6231,22 +6193,6 @@ class TestBusinessTemplate(ERP5TypeTestC
                        \
                        CopyBusinessTemplate \
                        Tic \
-                       CreateCustomAnotherWorkflow \
-                       CheckCustomAnotherWorkflowChain \
-                       AppendWorkflowToBusinessTemplate \
-                       AppendWorkflowChainToBusinessTemplate \
-                       BuildBusinessTemplate \
-                       SaveBusinessTemplate \
-                       RemoveWorkflow \
-                       CheckCustomWorkflowChain \
-                       RemoveBusinessTemplate \
-                       RemoveAllTrashBins \
-                       ImportBusinessTemplate \
-                       UseImportBusinessTemplate \
-                       InstallBusinessTemplate \
-                       Tic \
-                       \
-                       CheckCustomAnotherWorkflowChain \
                        \
                        RemoveWorkflowFromBusinessTemplate \
                        RemoveWorkflowChainFromBusinessTemplate \
@@ -6258,7 +6204,7 @@ class TestBusinessTemplate(ERP5TypeTestC
                        UseImportBusinessTemplate \
                        InstallBusinessTemplate \
                        Tic \
-                       CheckCustomWorkflowChain \
+                       CheckOriginalWorkflowChain \
                        CheckWorkflowChainExists \
                        '
     sequence_list.addSequenceString(sequence_string)



More information about the Erp5-report mailing list