summaryrefslogtreecommitdiff
path: root/addons/test_mail/tests/test_message_post.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/test_mail/tests/test_message_post.py')
-rw-r--r--addons/test_mail/tests/test_message_post.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/test_mail/tests/test_message_post.py b/addons/test_mail/tests/test_message_post.py
index 14a8e9e3628..bf894fafe12 100644
--- a/addons/test_mail/tests/test_message_post.py
+++ b/addons/test_mail/tests/test_message_post.py
@@ -86,7 +86,7 @@ class TestMessagePost(TestMailCommon, TestRecipients):
self.assertEqual(msg.channel_ids, self.env['mail.channel'])
# notifications emails should have been deleted
- self.assertFalse(self.env['mail.mail'].search([('mail_message_id', '=', msg.id)]),
+ self.assertFalse(self.env['mail.mail'].sudo().search([('mail_message_id', '=', msg.id)]),
'message_post: mail.mail notifications should have been auto-deleted')
@mute_logger('odoo.addons.mail.models.mail_mail')
@@ -101,7 +101,7 @@ class TestMessagePost(TestMailCommon, TestRecipients):
)
# notifications emails should not have been deleted: one for customers, one for user
- self.assertEqual(len(self.env['mail.mail'].search([('mail_message_id', '=', msg.id)])), 2)
+ self.assertEqual(len(self.env['mail.mail'].sudo().search([('mail_message_id', '=', msg.id)])), 2)
@mute_logger('odoo.addons.mail.models.mail_mail')
def test_post_notifications_emails_tweak(self):