|
@ -104,6 +104,11 @@ class TestMailgun(TransactionCase): |
|
|
self.test_event_delivered() |
|
|
self.test_event_delivered() |
|
|
with self.assertRaises(ValidationError): |
|
|
with self.assertRaises(ValidationError): |
|
|
self.env['mail.tracking.email']._mailgun_values() |
|
|
self.env['mail.tracking.email']._mailgun_values() |
|
|
|
|
|
# now we set an specific domain for Mailgun: |
|
|
|
|
|
# i.e: we configure new EU zone without loosing old domain statistics |
|
|
|
|
|
self.env['ir.config_parameter'].set_param( |
|
|
|
|
|
'mailgun.domain', 'eu.example.com') |
|
|
|
|
|
self.test_event_delivered() |
|
|
|
|
|
|
|
|
@mute_logger('odoo.addons.mail_tracking_mailgun.models' |
|
|
@mute_logger('odoo.addons.mail_tracking_mailgun.models' |
|
|
'.mail_tracking_email') |
|
|
'.mail_tracking_email') |
|
@ -169,7 +174,8 @@ class TestMailgun(TransactionCase): |
|
|
response = self.env['mail.tracking.email'].event_process( |
|
|
response = self.env['mail.tracking.email'].event_process( |
|
|
None, self.event, self.metadata) |
|
|
None, self.event, self.metadata) |
|
|
self.assertEqual('OK', response) |
|
|
self.assertEqual('OK', response) |
|
|
event = self.event_search('delivered') |
|
|
|
|
|
|
|
|
events = self.event_search('delivered') |
|
|
|
|
|
for event in events: |
|
|
self.assertEqual(event.timestamp, float(self.timestamp)) |
|
|
self.assertEqual(event.timestamp, float(self.timestamp)) |
|
|
self.assertEqual(event.recipient, self.recipient) |
|
|
self.assertEqual(event.recipient, self.recipient) |
|
|
|
|
|
|
|
|