# -*- coding: utf-8 -*- # Copyright 2019 Therp BV # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from openerp.tests.common import TransactionCase from lxml import etree class TestMailEmbedImage(TransactionCase): post_install = True at_install = False def test_mail_embed_image(self): server = self.env['ir.mail_server'] root = etree.Element('div') etree.SubElement(root, 'img') etree.SubElement(root, 'img') body = etree.tostring(root) message = server.build_email( 'test@example.com', 'test@example.com', 'subject', body, ) # TODO assertions