Skip to content

Commit

Permalink
[IMP] mute logger on tests error responses so Travis doesn't fail
Browse files Browse the repository at this point in the history
  • Loading branch information
chienandalu committed Jul 14, 2017
1 parent a64a5a5 commit 6778160
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mail_tracking_mailgun/tests/test_mailgun.py
Expand Up @@ -2,6 +2,7 @@
# Copyright 2016 Antonio Espinosa - <antonio.espinosa@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo.tools import mute_logger
from odoo.tests.common import TransactionCase


Expand Down Expand Up @@ -63,6 +64,8 @@ def test_no_api_key(self):
self.env['ir.config_parameter'].set_param('mailgun.apikey', '')
self.test_event_delivered()

@mute_logger('odoo.addons.mail_tracking_mailgun.models'
'.mail_tracking_email')
def test_bad_signature(self):
self.event.update({
'event': u'delivered',
Expand All @@ -72,6 +75,8 @@ def test_bad_signature(self):
None, self.event, self.metadata)
self.assertEqual('ERROR: Signature', response)

@mute_logger('odoo.addons.mail_tracking_mailgun.models'
'.mail_tracking_email')
def test_bad_event_type(self):
self.event.update({
'event': u'bad_event',
Expand All @@ -80,6 +85,8 @@ def test_bad_event_type(self):
None, self.event, self.metadata)
self.assertEqual('ERROR: Event type not supported', response)

@mute_logger('odoo.addons.mail_tracking_mailgun.models'
'.mail_tracking_email')
def test_bad_db(self):
self.event.update({
'event': u'delivered',
Expand All @@ -102,6 +109,8 @@ def test_bad_ts(self):
None, self.event, self.metadata)
self.assertEqual('OK', response)

@mute_logger('odoo.addons.mail_tracking_mailgun.models'
'.mail_tracking_email')
def test_tracking_not_found(self):
self.event.update({
'event': u'delivered',
Expand Down

0 comments on commit 6778160

Please sign in to comment.