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

maileva_connector: py3

parent 80dbf416
...@@ -121,7 +121,7 @@ def submitRequestWithFailure(**kw): ...@@ -121,7 +121,7 @@ def submitRequestWithFailure(**kw):
class ServiceWithException: class ServiceWithException:
def submit(self, **kw): def submit(self, **kw):
raise Exception('exception') raise RuntimeError('exception')
class ClientWithException: class ClientWithException:
def __init__(self): def __init__(self):
...@@ -416,11 +416,10 @@ class testMailevaSOAPConnector(ERP5TypeTestCase): ...@@ -416,11 +416,10 @@ class testMailevaSOAPConnector(ERP5TypeTestCase):
def test_maileva_request_validation(self): def test_maileva_request_validation(self):
xml = self.maileva_connector.generateRequestXML(self.recipient, self.sender, self.document, 'test_track_id', 'maileva_connection_for_test') xml = self.maileva_connector.generateRequestXML(self.recipient, self.sender, self.document, 'test_track_id', 'maileva_connection_for_test')
# lxml doesn't support https in schemaLocation, download locally # lxml doesn't support https in schemaLocation, download locally
src = open(os.path.join(os.path.dirname(Products.ERP5.tests.__file__), 'test_data', "MailevaPJSSchema.xsd")) with open(os.path.join(os.path.dirname(Products.ERP5.tests.__file__), 'test_data', "MailevaPJSSchema.xsd")) as f:
xsd = etree.parse(src) xsd = etree.parse(f)
schema_validator = etree.XMLSchema(xsd) schema_validator = etree.XMLSchema(xsd)
schema_validator.assertValid(etree.fromstring(xml.encode("UTF-8"))) schema_validator.assertValid(etree.fromstring(xml))
def test_send_state_workflow(self): def test_send_state_workflow(self):
pdf = self.portal.document_module.newContent(portal_type='PDF') pdf = self.portal.document_module.newContent(portal_type='PDF')
......
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