[FIX] email_template: sending an email using the

send_mail method of a template is not related to openchatter anymore;
therefore recipients should not be called 'followers of XX', but use
their real name instead. This is already done, but the tests were not
updated.

bzr revid: tde@openerp.com-20140325103955-oc7ob98b1jql7tlz
This commit is contained in:
Thibault Delavallée 2014-03-25 11:39:55 +01:00
parent b01ecbec97
commit 9c80b99e5e
1 changed files with 2 additions and 2 deletions

View File

@ -237,8 +237,8 @@ class test_message_compose(TestMail):
email_template.send_mail(cr, uid, email_template_id, self.group_pigs_id, force_send=True, context=context)
sent_emails = self._build_email_kwargs_list
email_to_lst = [
['b@b.b', 'c@c.c'], ['"Followers of Pigs" <admin@yourcompany.example.com>'],
['"Followers of Pigs" <raoul@raoul.fr>'], ['"Followers of Pigs" <bert@bert.fr>']]
['b@b.b', 'c@c.c'], ['Administrator <admin@yourcompany.example.com>'],
['Raoul Grosbedon <raoul@raoul.fr>'], ['Bert Tartignole <bert@bert.fr>']]
self.assertEqual(len(sent_emails), 4, 'email_template: send_mail: 3 valid email recipients + email_to -> should send 4 emails')
for email in sent_emails:
self.assertIn(email['email_to'], email_to_lst, 'email_template: send_mail: wrong email_recipients')