[IMP] Shut mock exceptions up

pull/318/head
David Vidal 2017-07-14 18:47:30 +02:00 committed by ernesto
parent 82637135ca
commit 418b0074d7
1 changed files with 2 additions and 0 deletions

View File

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