fix: eml and msg are in sync again.

pull/1104/head
Raphaël Vinot 2023-11-17 13:57:02 +01:00
parent 2dcb5f1efa
commit 199532113a
1 changed files with 1 additions and 4 deletions

View File

@ -64,16 +64,13 @@ class TestEmailObject(unittest.TestCase):
self._get_values(eml_email_object, "to")[0]) self._get_values(eml_email_object, "to")[0])
self.assertEqual(self._get_values(email_object, "from")[0], self.assertEqual(self._get_values(email_object, "from")[0],
self._get_values(eml_email_object, "from")[0]) self._get_values(eml_email_object, "from")[0])
dirty_display_name = self._get_values(email_object, "from-display-name")[0] self.assertEqual(self._get_values(email_object, "from-display-name")[0],
dirty_display_name = dirty_display_name[:-2] + dirty_display_name[-1]
self.assertEqual(dirty_display_name,
self._get_values(eml_email_object, "from-display-name")[0]) self._get_values(eml_email_object, "from-display-name")[0])
self.assertEqual(len(self._get_values(email_object, "email-body")), 2) self.assertEqual(len(self._get_values(email_object, "email-body")), 2)
self.assertEqual(self._get_values(email_object, "received-header-ip"), self.assertEqual(self._get_values(email_object, "received-header-ip"),
self._get_values(eml_email_object, "received-header-ip")) self._get_values(eml_email_object, "received-header-ip"))
def test_bom_encoded(self): def test_bom_encoded(self):
"""Test utf-8-sig encoded email""" """Test utf-8-sig encoded email"""
bom_email_object = EMailObject(Path("tests/email_testfiles/mail_1_bom.eml")) bom_email_object = EMailObject(Path("tests/email_testfiles/mail_1_bom.eml"))