Commit d2bf0ea3 authored by Jérome Perrin's avatar Jérome Perrin Committed by Arnaud Fontaine

ERP5Type/tests/utils: WIP py3

parent 5674f88c
...@@ -107,6 +107,8 @@ class DummyMailHostMixin(object): ...@@ -107,6 +107,8 @@ class DummyMailHostMixin(object):
@staticmethod @staticmethod
def _decodeMessage(messageText): def _decodeMessage(messageText):
""" Decode message""" """ Decode message"""
if six.PY3 and isinstance(messageText, bytes):
messageText = messageText.decode()
message_text = messageText message_text = messageText
for part in message_from_string(messageText).walk(): for part in message_from_string(messageText).walk():
if part.get_content_type() in ['text/plain', 'text/html' ] \ if part.get_content_type() in ['text/plain', 'text/html' ] \
......
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