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.

25 lines
787 B

  1. # Copyright 2017 Tecnativa - Pedro M. Baeza
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  3. from odoo.tests import common
  4. class TestMailDebrand(common.SavepointCase):
  5. @classmethod
  6. def setUpClass(cls):
  7. super(TestMailDebrand, cls).setUpClass()
  8. cls.template = cls.env.ref(
  9. 'mail.mail_template_data_notification_email_default'
  10. )
  11. def test_generate_email_simple(self):
  12. res = self.template.generate_email(
  13. self.env.user.id, fields=['body_html'],
  14. )
  15. self.assertNotIn('using', res)
  16. def test_generate_email_multi(self):
  17. res = self.template.generate_email(
  18. self.env.user.ids, fields=['body_html'],
  19. )
  20. self.assertNotIn('using', res[[*res.keys()][0]])