Commit 11edd11c authored by Jérome Perrin's avatar Jérome Perrin

added a test to make sure interraction workflow doesn't change the return value.

(currently broken so not activated)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3875 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4a0e4ead
......@@ -225,6 +225,27 @@ class TestInteractionWorkflow(ERP5TypeTestCase):
organisation.edit()
self.assertEquals(organisation.getDescription(),'aa')
def test_07(self, quiet=0, run=0):#run_all_test):
if not run: return
if not quiet:
self.logMessage('Interactions, Check If The Return Value Is Not Altered')
self.createInteractionWorkflow()
self.interaction.setProperties(
'afterEdit',
method_id='newContent',
after_script_name=('afterEdit',))
params = 'sci,**kw'
body = "context = sci.object\n" +\
"return 3\n"
self.script.ZPythonScript_edit(params,body)
self.createData()
organisation = self.organisation
dummy_bank_account = organisation.newContent(
portal_type='Bank Account',
id='dummy_bank_account')
self.assertNotEquals(dummy_bank_account, None)
self.assertNotEquals(dummy_bank_account, 3)
self.assertEquals(dummy_bank_account.getPortalType(), 'Bank Account')
if __name__ == '__main__':
framework()
......
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