From 865e144c4c17ccc7e7d2188cc7c824b188b27e95 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Wed, 2 Nov 2011 15:07:39 +0530 Subject: [PATCH] [IMP] crm: Put assert checking on communication_with_customer.yml for converted phonecall to partner bzr revid: ron@tinyerp.com-20111102093739-tdc0014h20cdnqii --- .../test/process/communication_with_customer.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/addons/crm/test/process/communication_with_customer.yml b/addons/crm/test/process/communication_with_customer.yml index 56a0e8acde1..9403f04902a 100644 --- a/addons/crm/test/process/communication_with_customer.yml +++ b/addons/crm/test/process/communication_with_customer.yml @@ -29,26 +29,31 @@ self.send_mail(cr, uid, [id], context=context) except: pass - - - Now, I convert him into customer and put into regular customer list. - !python {model: crm.lead}: | lead_ids = self.search(cr, uid, [('email_from','=', 'Mr. John Right ')]) self.convert_partner(cr, uid, lead_ids, context=context) - - Now, I search customer in regular customer list. - !python {model: crm.lead}: | partner_ids = self.message_partner_by_email(cr, uid, 'Mr. John Right ') assert partner_ids.get('partner_id'), "Customer is not found in regular customer list." - - I convert one phonecall request as a customer and put into regular customer list. - !python {model: crm.phonecall}: | self.convert_partner(cr, uid, [ref('crm.crm_case_phone06')], context=context) +- + I check coverted phonecall to partner. +- + !python {model: res.partner}: | + partner_id = self.search(cr, uid, [('phonecall_ids', '=', ref('crm.crm_case_phone06'))]) + assert partner_id, "Customer is not found in regular customer list." + data = self.browse(cr, uid, partner_id, context=context)[0] + assert data.user_id.id == ref("base.user_root"), "User not assign properly" + assert data.name == "Bad time", "User not assign properly"