Commit 4bcfa8c5 authored by Jérome Perrin's avatar Jérome Perrin

testDeferredStyle: py3

parent 53072b0b
...@@ -321,7 +321,7 @@ class TestDeferredStyleBase(DeferredStyleTestCase): ...@@ -321,7 +321,7 @@ class TestDeferredStyleBase(DeferredStyleTestCase):
# content is translated # content is translated
part, = [x for x in mail_message.walk() if x.get_content_type() == self.content_type] part, = [x for x in mail_message.walk() if x.get_content_type() == self.content_type]
self.assertIn( self.assertIn(
'Historique', b'Historique',
self.portal.portal_transforms.convertTo( self.portal.portal_transforms.convertTo(
'text/plain', 'text/plain',
part.get_payload(decode=True), part.get_payload(decode=True),
...@@ -352,7 +352,7 @@ class TestDeferredStyleBase(DeferredStyleTestCase): ...@@ -352,7 +352,7 @@ class TestDeferredStyleBase(DeferredStyleTestCase):
mail_message = email.message_from_string(self.portal.MailHost._last_message[2].decode()) mail_message = email.message_from_string(self.portal.MailHost._last_message[2].decode())
part, = [x for x in mail_message.walk() if x.get_content_type() == self.content_type] part, = [x for x in mail_message.walk() if x.get_content_type() == self.content_type]
self.assertIn( self.assertIn(
'Historique', b'Historique',
self.portal.portal_transforms.convertTo( self.portal.portal_transforms.convertTo(
'text/plain', 'text/plain',
part.get_payload(decode=True), part.get_payload(decode=True),
...@@ -386,7 +386,7 @@ class TestDeferredStyleBase(DeferredStyleTestCase): ...@@ -386,7 +386,7 @@ class TestDeferredStyleBase(DeferredStyleTestCase):
# after they are saved to DB and automatically migrated. The getProperty # after they are saved to DB and automatically migrated. The getProperty
# above, which is also what ods_style does, only work after the report # above, which is also what ods_style does, only work after the report
# state is updated. # state is updated.
report.__setstate__(aq_base(getattr(skin_folder, report_form_name)).__getstate__()) aq_base(report).__setstate__(aq_base(getattr(skin_folder, report_form_name)).__getstate__())
self.assertEqual(report.getProperty('title'), self.id()) self.assertEqual(report.getProperty('title'), self.id())
# Report section method # Report section method
......
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