Browse Source

[IMP] Shut mock exceptions up

pull/269/head
David Vidal 7 years ago
committed by Jairo Llopis
parent
commit
88573ca875
  1. 2
      mail_tracking/tests/test_mail_tracking.py

2
mail_tracking/tests/test_mail_tracking.py

@ -3,6 +3,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import mock
from odoo.tools import mute_logger
import base64
import time
from odoo import http
@ -222,6 +223,7 @@ class TestMailTracking(TransactionCase):
)
self.assertEqual(len(opens), 3)
@mute_logger('odoo.addons.mail.models.mail_mail')
def test_smtp_error(self):
with mock.patch(mock_send_email) as mock_func:
mock_func.side_effect = Warning('Test error')

Loading…
Cancel
Save