diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-05-29 17:34:43 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-05-29 17:34:43 +0200 |
| commit | f36e6917bd73a56dc0c7468b4849920df4088154 (patch) | |
| tree | b63d02ae3e5ffc0815de009407363e0cf906f547 /addons/test_mail/tests/test_mail_gateway.py | |
| parent | bc0173c2d58ac26d80cb2f483a95c0c13b047dab (diff) | |
| parent | 37eed7c509fb5846c89ef37046df4b3cab299719 (diff) | |
[MERGE] forward port branch saas-11.3 up to 37eed7c509f
Diffstat (limited to 'addons/test_mail/tests/test_mail_gateway.py')
| -rw-r--r-- | addons/test_mail/tests/test_mail_gateway.py | 14 |
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] |
