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
25 lines
713 B
# -*- coding: utf-8 -*-
|
|
# Copyright 2019 Therp BV <https://therp.nl>
|
|
# 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
|