From 1a93e8285afae14e7862ebc4b6d6ee17ac8f5396 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 27 Oct 2017 15:12:50 +0200 Subject: [PATCH] [FIX] website_mail_channel: adapt test --- addons/website_mail_channel/tests/test_unsubscribe.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/website_mail_channel/tests/test_unsubscribe.py b/addons/website_mail_channel/tests/test_unsubscribe.py index 44128c30b86..743232890a8 100644 --- a/addons/website_mail_channel/tests/test_unsubscribe.py +++ b/addons/website_mail_channel/tests/test_unsubscribe.py @@ -3,7 +3,7 @@ import requests from odoo.api import Environment from odoo.tests import common -from odoo.tools.misc import mute_logger +from odoo.tools.misc import mute_logger, ustr class TestConfirmUnsubscribe(common.HttpCase): @@ -64,8 +64,7 @@ class TestConfirmUnsubscribe(common.HttpCase): self.mailing_list.id, self.partner.id, self.token ) - # FIXME: may need to be altered during 11.0 forward port r = self.url_open(url) - body = r.read().decode('utf-8') + body = ustr(r.content) # normalize space to make matching simpler self.assertIn(text, u' '.join(body.split()))