You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
846 B

  1. # -*- coding: utf-8 -*-
  2. # © 2016 ACSONE SA/NV <https://acsone.eu>
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. import odoo.tests.common as common
  5. class TestMailNotification(common.TransactionCase):
  6. def setUp(self):
  7. super(TestMailNotification, self).setUp()
  8. self.partner_obj = self.env['res.partner']
  9. def test_get_signature_footer(self):
  10. vals = {
  11. 'name': 'p1@example.com',
  12. }
  13. partner1 = self.partner_obj.create(vals)
  14. body = 'this is the body'
  15. subject = 'this is the subject'
  16. recipients = partner1
  17. emails, recipients_nbr = \
  18. self.partner_obj._notify_send(body, subject, recipients)
  19. self.assertTrue(
  20. partner1.name in emails.body_html,
  21. 'Partner name is not in the body of the mail')