Commit d5efc10a authored by Jérome Perrin's avatar Jérome Perrin

free_subscription: py3

parent 037e7c98
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
############################################################################## ##############################################################################
import unittest import unittest
import requests
from Products.ERP5Type.tests.utils import reindex from Products.ERP5Type.tests.utils import reindex
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.utils import DummyMailHost from Products.ERP5Type.tests.utils import DummyMailHost
...@@ -308,12 +309,12 @@ class TestFreeSubscription(ERP5TypeTestCase): ...@@ -308,12 +309,12 @@ class TestFreeSubscription(ERP5TypeTestCase):
def stepClickUnsubscriptionLinkInEvent(self, sequence=None, sequence_list=None, def stepClickUnsubscriptionLinkInEvent(self, sequence=None, sequence_list=None,
**kw): **kw):
from six.moves.urllib.request import urlopen
link = sequence['unsubscription_link'] link = sequence['unsubscription_link']
self.logout() self.logout()
data = urlopen(link) resp = requests.get(link)
self.assertNotIn("Site Error", data) self.assertEqual(resp.status_code, 200, (resp.status_code, resp.content))
self.assertNotIn("You do not have enough permissions to access this page", data.read()) self.assertNotIn(b"Site Error", resp.content)
self.assertNotIn(b"You do not have enough permissions to access this page", resp.content)
self.login() self.login()
def stepCheckFreeSubscriptionRequestCreated(self, sequence=None, sequence_list=None, def stepCheckFreeSubscriptionRequestCreated(self, sequence=None, sequence_list=None,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment