social/mail_debrand/tests/test_mail_debrand.py
2021-12-15 11:31:01 +01:00

26 lines
787 B
Python

# Copyright 2017 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests import common
class TestMailDebrand(common.SavepointCase):
@classmethod
def setUpClass(cls):
super(TestMailDebrand, cls).setUpClass()
cls.template = cls.env.ref(
'mail.mail_template_data_notification_email_default'
)
def test_generate_email_simple(self):
res = self.template.generate_email(
self.env.user.id, fields=['body_html'],
)
self.assertNotIn('using', res)
def test_generate_email_multi(self):
res = self.template.generate_email(
self.env.user.ids, fields=['body_html'],
)
self.assertNotIn('using', res[[*res.keys()][0]])