Commit 8f280383 authored by Lucas Carvalho's avatar Lucas Carvalho

Added new method to DummyMailHost to return the last log message. (Merged with...

Added new method to DummyMailHost to return the last log message. (Merged with ExpressOrderMixin.DummyMailHost)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37149 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7e0e7645
......@@ -68,6 +68,7 @@ class DummyMailHost(MailHost):
self._previous_message = self._last_message
self._last_message = (mfrom, mto, messageText)
self._message_list.append(self._last_message)
def _decodeMessage(self, messageText):
""" Decode message"""
message_text = messageText
......@@ -76,12 +77,18 @@ class DummyMailHost(MailHost):
and not part.is_multipart():
message_text = part.get_payload(decode=1)
return message_text
def getMessageList(self, decode=True):
""" Return message list"""
if decode:
return [ (m[0], m[1], self._decodeMessage(m[2])) for m in self._message_list]
return self._message_list
def getLastLog(self):
""" Return last message """
return self._last_message
class DummyTranslationService:
"""A dummy translation service where you can access translated msgids and
mappings in _translated.
......
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