From 23d8090ff9f0fe2c70afb120acee88915f44d85a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 23 May 2012 11:19:40 +0200 Subject: [PATCH] [FIX] crm_lead yml tests: fixed some tests, propagating changes in lead data. bzr revid: tde@openerp.com-20120523091940-6lxdk29488lwp9o5 --- addons/crm/test/process/cancel_lead.yml | 4 ++-- addons/crm/test/process/lead2opportunity2win.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/crm/test/process/cancel_lead.yml b/addons/crm/test/process/cancel_lead.yml index 41dc62caeba..4f99fb70320 100644 --- a/addons/crm/test/process/cancel_lead.yml +++ b/addons/crm/test/process/cancel_lead.yml @@ -28,7 +28,7 @@ - !python {model: crm.lead}: | lead = self.browse(cr, uid, ref('crm.crm_case_itisatelesalescampaign0')) - assert lead.stage_id.id == ref('crm.stage_lead2'), "Opportunity should be 'New'." + assert lead.stage_id.id == ref('crm.stage_lead2'), "Opportunity stage should be 'Qualification'." assert lead.state == 'open', "Opportunity should be in 'open' state." - I escalate the lead to parent team. @@ -51,5 +51,5 @@ !python {model: crm.lead}: | lead = self.browse(cr, uid, ref('crm_case_itisatelesalescampaign0')) assert lead.stage_id.id == ref('crm.stage_lead6'), "Stage should be 'Lost'." - assert lead.state == 'done', "Opportunity is not in 'done' state." + assert lead.state == 'cancel', "Opportunity is not in 'cancel' state." assert lead.probability == 0.0, 'Opportunity probability is wrong and should be 0.0.' diff --git a/addons/crm/test/process/lead2opportunity2win.yml b/addons/crm/test/process/lead2opportunity2win.yml index a5b6c421dbb..e0b79dee460 100644 --- a/addons/crm/test/process/lead2opportunity2win.yml +++ b/addons/crm/test/process/lead2opportunity2win.yml @@ -69,9 +69,9 @@ - !python {model: crm.lead}: | lead = self.browse(cr, uid, ref('crm_case_qrecorp0')) - assert lead.state == 'done', 'Opportunity is not in done state!' - assert lead.stage_id.name == 'Won', ' Stage of Opportunity is not win!' - assert lead.probability == 100.0, 'probability revenue should not be 100.0!' + assert lead.stage_id.id == ref('crm.stage_lead5'), "Opportunity stage should be 'Won'." + assert lead.state == 'done', "Opportunity is not in 'done' state!" + assert lead.probability == 100.0, "Revenue probability should be 100.0!" - I convert mass lead into opportunity customer. -