Commit 88899b28 authored by Jérome Perrin's avatar Jérome Perrin

testInvoice py3

parent 52c8f90f
...@@ -567,7 +567,7 @@ class TestInvoice(TestInvoiceMixin): ...@@ -567,7 +567,7 @@ class TestInvoice(TestInvoiceMixin):
output = BytesIO() output = BytesIO()
output.write(odt) output.write(odt)
m = OpenDocumentTextFile(output) m = OpenDocumentTextFile(output)
text_content=m.toString().encode('ascii','replace') text_content=m.toString().encode('ascii','replace').decode()
if text_content.find('Resource Tax') != -1 : if text_content.find('Resource Tax') != -1 :
self.fail('fail to delete the tax line in product line') self.fail('fail to delete the tax line in product line')
if text_content.find('Tax Code') == -1 : if text_content.find('Tax Code') == -1 :
...@@ -640,7 +640,7 @@ class TestInvoice(TestInvoiceMixin): ...@@ -640,7 +640,7 @@ class TestInvoice(TestInvoiceMixin):
parser = OOoParser() parser = OOoParser()
parser.openFromBytes(odt) parser.openFromBytes(odt)
style_xml = parser.oo_files['styles.xml'] style_xml = parser.oo_files['styles.xml']
self.assertNotIn('<draw:image', style_xml) self.assertNotIn(b'<draw:image', style_xml)
def test_Invoice_viewAsODT_invalid_image(self): def test_Invoice_viewAsODT_invalid_image(self):
resource = self.portal.getDefaultModule( resource = self.portal.getDefaultModule(
......
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