Commit b99a6dc1 authored by Romain Courteaud's avatar Romain Courteaud

Check Message-ID generation

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44712 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ce536895
...@@ -522,6 +522,7 @@ class TestNotificationToolWithCRM(TestNotificationTool): ...@@ -522,6 +522,7 @@ class TestNotificationToolWithCRM(TestNotificationTool):
last_message = self.portal.MailHost._last_message last_message = self.portal.MailHost._last_message
self.assertNotEquals((), last_message) self.assertNotEquals((), last_message)
mfrom, mto, messageText = last_message mfrom, mto, messageText = last_message
mail_dict = decode_email(messageText)
self.assertEquals('Portal Administrator <site@example.invalid>', mfrom) self.assertEquals('Portal Administrator <site@example.invalid>', mfrom)
self.assertEquals(['userA@example.invalid'], mto) self.assertEquals(['userA@example.invalid'], mto)
...@@ -530,6 +531,8 @@ class TestNotificationToolWithCRM(TestNotificationTool): ...@@ -530,6 +531,8 @@ class TestNotificationToolWithCRM(TestNotificationTool):
self.assertEquals(1, len(event_list)) self.assertEquals(1, len(event_list))
event = event_list[0] event = event_list[0]
self.assertEquals(mail_dict['headers']['message-id'],
event.getSourceReference())
self.assertEquals('Mail Message', event.getPortalTypeName()) self.assertEquals('Mail Message', event.getPortalTypeName())
self.assertEquals('Subject', event.getTitle()) self.assertEquals('Subject', event.getTitle())
self.assertEquals('Message', event.getTextContent()) self.assertEquals('Message', event.getTextContent())
......
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