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.

26 lines
808 B

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