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
713 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2019 Therp BV <https://therp.nl>
  3. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
  4. from openerp.tests.common import TransactionCase
  5. from lxml import etree
  6. class TestMailEmbedImage(TransactionCase):
  7. post_install = True
  8. at_install = False
  9. def test_mail_embed_image(self):
  10. server = self.env['ir.mail_server']
  11. root = etree.Element('div')
  12. etree.SubElement(root, 'img')
  13. etree.SubElement(root, 'img')
  14. body = etree.tostring(root)
  15. message = server.build_email(
  16. 'test@example.com',
  17. 'test@example.com',
  18. 'subject',
  19. body,
  20. )
  21. # TODO assertions