[IMP] make sure the records will be in right order (and trigger chirurgiens-dentistes.fr for the second name_search)

bzr revid: mat@openerp.com-20140129124806-dq56o7r1yt38nb08
This commit is contained in:
Martin Trigaux
2014-01-29 13:48:06 +01:00
parent e6ee1947f8
commit cb4ce12d3a
+3 -3
View File
@@ -43,16 +43,16 @@ class test_base(common.TransactionCase):
cr,uid = self.cr, self.uid
for name, active in [
('"A Raoul Grosbedon" <raoul@chirurgiens-dentistes.fr>', False),
('B Raoul chirurgiens-dentistes.fr', True),
("C Raoul O'hara <!@historicalsociety.museum>", True),
('ryu+giga-Sushi@aizubange.fukushima.jp', True),
('Raoul chirurgiens-dentistes.fr', True),
(" Raoul O'hara <!@historicalsociety.museum>", True)
]:
partner_id, dummy = self.res_partner.name_create(cr, uid, name, context={'default_active': active})
partners = self.res_partner.name_search(cr, uid, 'Raoul')
self.assertEqual(len(partners), 2, 'Incorrect search number result for name_search')
partners = self.res_partner.name_search(cr, uid, 'Raoul', limit=1)
self.assertEqual(len(partners), 1, 'Incorrect search number result for name_search with a limit')
self.assertEqual(partners[0][1], 'Raoul chirurgiens-dentistes.fr', 'Incorrect partner returned, should be the first active')
self.assertEqual(partners[0][1], 'B Raoul chirurgiens-dentistes.fr', 'Incorrect partner returned, should be the first active')
def test_20_res_partner_address_sync(self):
cr, uid = self.cr, self.uid