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
846 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.TransactionCase):
  5. def setUp(self):
  6. super().setUp()
  7. self.default_arch = self.env.ref(
  8. 'mail.message_notification_email'
  9. ).arch
  10. self.paynow_arch = self.env.ref(
  11. 'mail.mail_notification_paynow'
  12. ).arch
  13. def test_default_debrand(self):
  14. self.assertIn('using', self.default_arch)
  15. res = self.env["mail.template"]._debrand_body(self.default_arch)
  16. self.assertNotIn('using', res)
  17. def test_paynow_debrand(self):
  18. self.assertIn('Powered by', self.paynow_arch)
  19. res = self.env["mail.template"]._debrand_body(self.paynow_arch)
  20. self.assertNotIn('Powered by', res)