[ADD] Test that the variable 'workflow' is correctly assigned in Python server actions (if not, the code will crash)

bzr revid: rim@openerp.com-20140221125708-6vt2ucp5sjtvl02q
This commit is contained in:
Richard Mathot (OpenERP) 2014-02-21 13:57:08 +01:00
parent 6b40002f98
commit 13194a10f7
1 changed files with 2 additions and 1 deletions

View File

@ -97,7 +97,8 @@ class TestServerActions(TestServerActionsBase):
self.ir_actions_server.write(cr, uid, self.act_id, {
'state': 'code',
'code': """partner_name = obj.name + '_code'
self.pool["res.partner"].create(cr, uid, {"name": partner_name}, context=context)"""
self.pool["res.partner"].create(cr, uid, {"name": partner_name}, context=context)
workflow"""
})
run_res = self.ir_actions_server.run(cr, uid, [self.act_id], context=self.context)
self.assertFalse(run_res, 'ir_actions_server: code server action correctly finished should return False')