From 965bc61f61a1b3520fd55dc97c474cfcb6012271 Mon Sep 17 00:00:00 2001 From: David Date: Fri, 25 May 2018 10:41:45 +0200 Subject: [PATCH] fixup! [IMP] mass_mailing_custom_unsubscribe: GDPR compliance (#267) --- mass_mailing_custom_unsubscribe/tests/test_ui.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mass_mailing_custom_unsubscribe/tests/test_ui.py b/mass_mailing_custom_unsubscribe/tests/test_ui.py index 39d43be523..ee2f18e535 100644 --- a/mass_mailing_custom_unsubscribe/tests/test_ui.py +++ b/mass_mailing_custom_unsubscribe/tests/test_ui.py @@ -7,6 +7,9 @@ class UICase(HttpCase): + _tour_run = "odoo.__DEBUG__.services['web_tour.tour'].run('%s')" + _tour_ready = "odoo.__DEBUG__.services['web_tour.tour'].tours.%s.ready" + def extract_url(self, mail, *args, **kwargs): url = mail._get_unsubscribe_url(mail, self.email) self.assertIn("&token=", url) @@ -18,8 +21,9 @@ def setUp(self): super(UICase, self).setUp() self.email = "test.contact@example.com" self.mail_postprocess_patch = mock.patch( - "openerp.addons.mass_mailing.models.mail_mail.MailMail." - "_postprocess_sent_message", + "openerp.addons.mail.models.mail_mail.MailMail." + "_postprocess_sent_message_v9", + autospec=True, side_effect=self.extract_url, ) with self.tempenv() as env: