Skip to content

Commit

Permalink
fixup! [IMP] mass_mailing_custom_unsubscribe: GDPR compliance (OCA#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
chienandalu committed May 25, 2018
1 parent dd2bb17 commit 965bc61
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mass_mailing_custom_unsubscribe/tests/test_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand Down

0 comments on commit 965bc61

Please sign in to comment.