From 8f38ab0b6e859358a9d6ddf92467a6dfd7b9fad9 Mon Sep 17 00:00:00 2001 From: Neissi Torres Lima Date: Thu, 4 Sep 2014 19:25:03 -0300 Subject: Neissi / Duda - break leap mail header in multiple recipients --- service/test/adapter/pixelated_mail_test.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'service/test') diff --git a/service/test/adapter/pixelated_mail_test.py b/service/test/adapter/pixelated_mail_test.py index e3ebf727..77f9738f 100644 --- a/service/test/adapter/pixelated_mail_test.py +++ b/service/test/adapter/pixelated_mail_test.py @@ -87,3 +87,23 @@ class TestPixelatedMail(unittest.TestCase): smtp_format = mail.to_smtp_format(_from='pixelated@org') self.assertRegexpMatches(smtp_format, "\nFrom: pixelated@org") + + def test_extract_headers_should_break_header_in_multiple_recipients(self): + headers = test_helper.DEFAULT_HEADERS.copy() + headers['to'] = "nlima@example.com, ddornelles@example.com" + headers['bcc'] = "nlima@example.com, ddornelles@example.com" + headers['cc'] = "nlima@example.com, ddornelles@example.com" + + leap_mail = test_helper.leap_mail(headers=headers) + + pixelated_mail = PixelatedMail.from_leap_mail(leap_mail) + + self.assertEquals(pixelated_mail.headers['to'], ["nlima@example.com", "ddornelles@example.com" ]) + self.assertEquals(pixelated_mail.headers['bcc'], ["nlima@example.com", "ddornelles@example.com" ]) + self.assertEquals(pixelated_mail.headers['cc'], ["nlima@example.com", "ddornelles@example.com" ]) + + + + + + -- cgit v1.2.3