From 83b5a42efce56ac25f007f476587d554736b49b4 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Tue, 18 Oct 2011 15:26:22 +0530 Subject: [PATCH] [ADD] crm_claim: 1) Added directory =>crm_claim/test/ui, 1) Added file crm_claim/test/ui/claim_form.yml, 2) covered partner_onchange_id and checked data bzr revid: ron@tinyerp.com-20111018095622-ceg2nur0nlt93pjp --- addons/crm_claim/__openerp__.py | 3 ++- addons/crm_claim/test/ui/claim_form.yml | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 addons/crm_claim/test/ui/claim_form.yml diff --git a/addons/crm_claim/__openerp__.py b/addons/crm_claim/__openerp__.py index 2fabcd4b100..8f0aef1bf37 100644 --- a/addons/crm_claim/__openerp__.py +++ b/addons/crm_claim/__openerp__.py @@ -48,7 +48,8 @@ automatically new claims based on incoming emails. 'demo_xml': [ 'crm_claim_demo.xml', ], - 'test': ['test/process/claim.yml'], + 'test': ['test/process/claim.yml', + 'test/ui/claim_form.yml'], 'installable': True, 'active': False, 'certificate' : '00612027414703404749', diff --git a/addons/crm_claim/test/ui/claim_form.yml b/addons/crm_claim/test/ui/claim_form.yml new file mode 100644 index 00000000000..bbf37688ed6 --- /dev/null +++ b/addons/crm_claim/test/ui/claim_form.yml @@ -0,0 +1,8 @@ +- + In order to test for changes on partner, data change automatically according to partner. +- + !python {model: crm.claim}: | + partner_onchange = self.onchange_partner_id(cr, uid, [ref('crm_case_claim04')], ref('base.res_partner_10')) + assert partner_onchange['value']['partner_phone'] == "+33-658-256545" ,"Phone number is wrong" + assert partner_onchange['value']['partner_address_id'] == 20 ,"Address is wrong" + assert partner_onchange['value']['email_from'] == 'l.dupont@tecsas.fr' ,"Email address is wrong"