Commit 9e07d9c1 authored by Yusei Tahara's avatar Yusei Tahara

Check if From header has multiple addresses and some of them are not written...

Check if From header has multiple addresses and some of them are not written like <user@example.com>.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25762 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7d9aa5dc
...@@ -342,12 +342,17 @@ class TestCRMMailIngestion(ERP5TypeTestCase): ...@@ -342,12 +342,17 @@ class TestCRMMailIngestion(ERP5TypeTestCase):
title='Sender', title='Sender',
subordination_value=customer_organisation, subordination_value=customer_organisation,
default_email_text='sender@customer.com') default_email_text='sender@customer.com')
# also create the recipient # also create the recipients
if 'me' not in portal.person_module.contentIds(): if 'me' not in portal.person_module.contentIds():
portal.person_module.newContent( portal.person_module.newContent(
id='me', id='me',
title='Me', title='Me',
default_email_text='me@erp5.org') default_email_text='me@erp5.org')
if 'he' not in portal.person_module.contentIds():
portal.person_module.newContent(
id='he',
title='He',
default_email_text='he@erp5.org')
# make sure customers are available to catalog # make sure customers are available to catalog
get_transaction().commit() get_transaction().commit()
...@@ -417,7 +422,10 @@ class TestCRMMailIngestion(ERP5TypeTestCase): ...@@ -417,7 +422,10 @@ class TestCRMMailIngestion(ERP5TypeTestCase):
event = self._ingestMail('simple') event = self._ingestMail('simple')
get_transaction().commit() get_transaction().commit()
self.tic() self.tic()
self.assertEquals('person_module/me', event.getDestination()) destination_list = event.getDestinationList()
destination_list.sort()
self.assertEquals(['person_module/he', 'person_module/me'],
destination_list)
def test_follow_up(self): def test_follow_up(self):
# follow up is found automatically, based on the content of the mail, and # follow up is found automatically, based on the content of the mail, and
......
...@@ -5,7 +5,7 @@ Message-ID: <4719FE4D.2070403@erp5.org> ...@@ -5,7 +5,7 @@ Message-ID: <4719FE4D.2070403@erp5.org>
Date: Sat, 20 Oct 2007 15:10:37 +0200 Date: Sat, 20 Oct 2007 15:10:37 +0200
From: Sender <sender@customer.com> From: Sender <sender@customer.com>
User-Agent: Thunderbird 2.0.0.6 (X11/20070728) User-Agent: Thunderbird 2.0.0.6 (X11/20070728)
To: Me <me@erp5.org> To: Me <me@erp5.org>, he@erp5.org,she@erp5.org
Subject: Simple Mail Test Subject: Simple Mail Test
Content-Type: text/plain; charset=UTF-8; format=flowed Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit
......
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