summaryrefslogtreecommitdiff
path: root/addons/test_mail/tests/test_mail_gateway.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/test_mail/tests/test_mail_gateway.py')
-rw-r--r--addons/test_mail/tests/test_mail_gateway.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/addons/test_mail/tests/test_mail_gateway.py b/addons/test_mail/tests/test_mail_gateway.py
index a9286797384..f24ee44fa3e 100644
--- a/addons/test_mail/tests/test_mail_gateway.py
+++ b/addons/test_mail/tests/test_mail_gateway.py
@@ -7,7 +7,7 @@ from email.utils import formataddr
from odoo.addons.test_mail.data.test_mail_data import \
MAIL_TEMPLATE, MAIL_TEMPLATE_PLAINTEXT, MAIL_MULTIPART_MIXED, MAIL_MULTIPART_MIXED_TWO, \
- MAIL_MULTIPART_IMAGE, MAIL_SINGLE_BINARY
+ MAIL_MULTIPART_IMAGE, MAIL_SINGLE_BINARY, MAIL_EML_ATTACHMENT, MAIL_XHTML
from odoo.addons.test_mail.tests.common import BaseFunctionalTest, MockEmails
from odoo.tools import mute_logger
@@ -79,6 +79,18 @@ class TestMailgateway(BaseFunctionalTest, MockEmails):
})
@mute_logger('odoo.addons.mail.models.mail_thread')
+ def test_message_parse_eml(self):
+ """ Test that the parsing of mail with embedded emails as eml(msg) which generates empty attachments, can be processed.
+ """
+ self.env['mail.thread'].message_process('mail.channel', MAIL_EML_ATTACHMENT)
+
+ @mute_logger('odoo.addons.mail.models.mail_thread')
+ def test_message_parse_xhtml(self):
+ """ Test that the parsing of mail with embedded emails as eml(msg) which generates empty attachments, can be processed.
+ """
+ self.env['mail.thread'].message_process('mail.channel', MAIL_XHTML)
+
+ @mute_logger('odoo.addons.mail.models.mail_thread')
def test_message_process_cid(self):
record = self.format_and_process(MAIL_MULTIPART_IMAGE, to='groups@example.com')
message = record.message_ids[0]