Commit 58f5964f authored by Nicolas Delaby's avatar Nicolas Delaby

Test forward email with attachment

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22524 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8b572a95
......@@ -485,6 +485,22 @@ class TestCRMMailIngestion(ERP5TypeTestCase):
self.assertEqual(document.getSourceValue().getTitle(), 'Sender')
self.assertEqual(document.getDestinationValue().getTitle(), 'Me')
def test_forwarder_mail_with_attachment(self):
"""
Make sure that if ingested email is forwarded one, the sender of
original mail should be the sender of event and the sender of
forwarded mail should be the recipient of event.
"""
document = self._ingestMail(filename='forwarded_attached')
get_transaction().commit()
self.tic()
self.assertEqual(document.getContentInformation().get('From'), 'Me <me@erp5.org>')
self.assertEqual(document.getContentInformation().get('To'), 'crm@erp5.org')
self.assertEqual(document.getSourceValue().getTitle(), 'Sender')
self.assertEqual(document.getDestinationValue().getTitle(), 'Me')
def test_encoding(self):
document = self._ingestMail(filename='encoded')
......
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