Commit c8fa2aca authored by Nicolas Delaby's avatar Nicolas Delaby

Use getter

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41128 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent de3c9b31
......@@ -577,42 +577,42 @@ class TestCRMMailIngestion(BaseTestCRM):
message.replace_header('subject', 'Visit:Company A')
data = message.as_string()
document = self._ingestMail(data=data)
self.assertEqual(document.portal_type, 'Visit')
self.assertEqual(document.getPortalType(), 'Visit')
self.assertEqual(document.getTitle(), 'Company A')
message = email.message_from_string(self._readTestData('simple'))
message.replace_header('subject', 'Fax:Company B')
data = message.as_string()
document = self._ingestMail(data=data)
self.assertEqual(document.portal_type, 'Fax Message')
self.assertEqual(document.getPortalType(), 'Fax Message')
self.assertEqual(document.getTitle(), 'Company B')
message = email.message_from_string(self._readTestData('simple'))
message.replace_header('subject', 'TEST:Company B')
data = message.as_string()
document = self._ingestMail(data=data)
self.assertEqual(document.portal_type, 'Mail Message')
self.assertEqual(document.getPortalType(), 'Mail Message')
self.assertEqual(document.getTitle(), 'TEST:Company B')
message = email.message_from_string(self._readTestData('simple'))
message.replace_header('subject', 'visit:Company A')
data = message.as_string()
document = self._ingestMail(data=data)
self.assertEqual(document.portal_type, 'Visit')
self.assertEqual(document.getPortalType(), 'Visit')
self.assertEqual(document.getTitle(), 'Company A')
message = email.message_from_string(self._readTestData('simple'))
message.replace_header('subject', 'phone:Company B')
data = message.as_string()
document = self._ingestMail(data=data)
self.assertEqual(document.portal_type, 'Phone Call')
self.assertEqual(document.getPortalType(), 'Phone Call')
self.assertEqual(document.getTitle(), 'Company B')
message = email.message_from_string(self._readTestData('simple'))
message.replace_header('subject', 'LETTER:Company C')
data = message.as_string()
document = self._ingestMail(data=data)
self.assertEqual(document.portal_type, 'Letter')
self.assertEqual(document.getPortalType(), 'Letter')
self.assertEqual(document.getTitle(), 'Company C')
message = email.message_from_string(self._readTestData('simple'))
......@@ -620,7 +620,7 @@ class TestCRMMailIngestion(BaseTestCRM):
message.set_payload('Visit:%s' % body)
data = message.as_string()
document = self._ingestMail(data=data)
self.assertEqual(document.portal_type, 'Visit')
self.assertEqual(document.getPortalType(), 'Visit')
self.assertEqual(document.getTextContent(), body)
message = email.message_from_string(self._readTestData('simple'))
......@@ -628,7 +628,7 @@ class TestCRMMailIngestion(BaseTestCRM):
message.set_payload('PHONE CALL:%s' % body)
data = message.as_string()
document = self._ingestMail(data=data)
self.assertEqual(document.portal_type, 'Phone Call')
self.assertEqual(document.getPortalType(), 'Phone Call')
self.assertEqual(document.getTextContent(), body)
def test_forwarder_mail(self):
......
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