diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-02-11 18:35:50 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-02-11 18:35:50 +0100 |
| commit | 1738fbb67e284b9c65fe6685fe6d28fc46b95021 (patch) | |
| tree | 93ddc1c975b44f3735b814e17704e80b0ca72062 /addons | |
| parent | 8c29df10e02e6777840ffd7a318472de29f77dd1 (diff) | |
[FIX] test_mail: only patch message_track for test model
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/test_mail/tests/test_mail_template.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/test_mail/tests/test_mail_template.py b/addons/test_mail/tests/test_mail_template.py index e1b14d57a20..bcaa1366ac5 100644 --- a/addons/test_mail/tests/test_mail_template.py +++ b/addons/test_mail/tests/test_mail_template.py @@ -223,7 +223,8 @@ class TestMailTemplate(BaseFunctionalTest, MockEmails, TestRecipients): }) def patched_message_track_post_template(*args, **kwargs): - args[0].message_post_with_template(template.id) + if args[0]._name == "mail.test.track": + args[0].message_post_with_template(template.id) return True with patch('odoo.addons.mail.models.mail_thread.MailThread._message_track_post_template', patched_message_track_post_template): |
