[FIX] crm_partner_assign: better error message in yaml tests

bzr revid: chs@openerp.com-20130311125437-3agi8g0avk7pbf8z
This commit is contained in:
Christophe Simonis 2013-03-11 13:54:37 +01:00
parent f4710f48aa
commit 45aa25187a
1 changed files with 4 additions and 4 deletions

View File

@ -10,8 +10,8 @@
-
!python {model: res.partner}: |
partner = self.browse(cr, uid, ref('base.res_partner_2'))
assert 50 < partner.partner_latitude < 51 , "Latitude is wrong"
assert 3 < partner.partner_longitude < 5 , "Longitude is wrong"
assert 50 < partner.partner_latitude < 51, "Latitude is wrong: 50 < %s < 51" % partner.partner_latitude
assert 3 < partner.partner_longitude < 5, "Longitude is wrong: 3 < %s < 5" % partner.partner_longitude
-
I assign nearest partner to opportunity.
-
@ -23,8 +23,8 @@
!python {model: crm.lead}: |
lead = self.browse(cr, uid, ref('crm.crm_case_19'))
assert lead.partner_assigned_id.id == ref('base.res_partner_15') , "Opportuniy is not assigned nearest partner"
assert 50 < lead.partner_latitude < 55, "Latitude is wrong"
assert -2 < lead.partner_longitude < 2, "Longitude is wrong"
assert 50 < lead.partner_latitude < 55, "Latitude is wrong: 50 < %s < 55" % partner.partner_latitude
assert -2 < lead.partner_longitude < 2, "Longitude is wrong: -2 < %s < 2" % partner.partner_longitude
-
I forward this opportunity to its nearest partner.
-