Message test: we never get a Message object, but always bytes/string/unicode.
Which type we get back, depends on the Python version and the Products.MailHost version.
This commit is contained in:
parent
e4bcf2f53c
commit
c9d9cfca04
@ -247,9 +247,6 @@ class TestModeratorNotificationUnit(unittest.TestCase):
|
|||||||
self.assertEqual(len(self.mailhost.messages), 1)
|
self.assertEqual(len(self.mailhost.messages), 1)
|
||||||
msg = self.mailhost.messages[0]
|
msg = self.mailhost.messages[0]
|
||||||
msg = msg.decode("utf-8")
|
msg = msg.decode("utf-8")
|
||||||
if not isinstance(msg, str):
|
|
||||||
self.assertTrue('test@example.com' in msg.mto)
|
|
||||||
else:
|
|
||||||
self.assertTrue('To: test@example.com' in msg)
|
self.assertTrue('To: test@example.com' in msg)
|
||||||
|
|
||||||
def test_do_not_notify_moderator_when_no_sender_is_available(self):
|
def test_do_not_notify_moderator_when_no_sender_is_available(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user