From ebb6ff26eb1dacb9e8d4774783c8a40bbc142879 Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Mon, 4 Apr 2005 08:33:45 +0000 Subject: [PATCH] added one test git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2785 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/tests/testInteractionWorkflow.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/product/ERP5/tests/testInteractionWorkflow.py b/product/ERP5/tests/testInteractionWorkflow.py index 13f68f62fb..986d6a3901 100755 --- a/product/ERP5/tests/testInteractionWorkflow.py +++ b/product/ERP5/tests/testInteractionWorkflow.py @@ -110,6 +110,8 @@ class Test(ERP5TypeTestCase): """ self.setDescription(value) Organisation.doSomethingStupid = doSomethingStupid + portal_type = self.getTypeTool()['Organisation'] + portal_type.base_category_list = ['size'] def createInteractionWorkflow(self): @@ -149,6 +151,7 @@ class Test(ERP5TypeTestCase): self.script.ZPythonScript_edit(params,body) self.createData() organisation = self.organisation + organisation.setDescription('bad') organisation.edit() self.assertEquals(organisation.getDescription(),'toto') @@ -164,6 +167,7 @@ class Test(ERP5TypeTestCase): self.script.ZPythonScript_edit(params,body) self.createData() organisation = self.organisation + organisation.setDescription('bad') organisation.edit(description='tutu') self.assertEquals(organisation.getDescription(),'toto') @@ -179,9 +183,26 @@ class Test(ERP5TypeTestCase): self.script.ZPythonScript_edit(params,body) self.createData() organisation = self.organisation + organisation.setDescription('bad') organisation.doSomethingStupid('tutu') self.assertEquals(organisation.getDescription(),'toto') + def test_05(self, quiet=0, run=run_all_test): + if not run: return + if not quiet: + self.logMessage('Interactions, Automatic Workflow Method With Extra Base Category') + self.createInteractionWorkflow() + self.interaction.setProperties('afterEdit',method_id='setSizeList _setSizeList',after_script_name=('afterEdit',)) + body = "context = sci.object\n" +\ + "context.setDescription('toto')" + params = 'sci,**kw' + self.script.ZPythonScript_edit(params,body) + self.createData() + organisation = self.organisation + organisation.setDescription('bad') + organisation.setSizeList(['size/1','size/2']) + self.assertEquals(organisation.getDescription(),'toto') + if __name__ == '__main__': -- 2.30.9