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.

14 lines
607 B

  1. # -*- coding: utf-8 -*-
  2. # © 2016 Therp BV <http://therp.nl>
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. from openerp.tests.common import TransactionCase
  5. class TestEmailTemplateQweb(TransactionCase):
  6. def test_email_template_qweb(self):
  7. template = self.env.ref('email_template_qweb.email_template_demo1')
  8. mail_values = template.generate_email_batch(
  9. template.id, [self.env.user.id])
  10. self.assertTrue(
  11. # this comes from the called template if everything worked
  12. '<footer>' in mail_values[self.env.user.id]['body_html'])