From 2c50e4495bfbdb04a05d07227c014ce5d0f28936 Mon Sep 17 00:00:00 2001 From: Bruno Wagner Goncalves Date: Tue, 26 Aug 2014 19:33:44 -0300 Subject: From dict is working now --- service/test/adapter/pixelated_mail_test.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'service/test/adapter') diff --git a/service/test/adapter/pixelated_mail_test.py b/service/test/adapter/pixelated_mail_test.py index c7fe9112..841a53f2 100644 --- a/service/test/adapter/pixelated_mail_test.py +++ b/service/test/adapter/pixelated_mail_test.py @@ -43,7 +43,7 @@ class TestPixelatedMail(unittest.TestCase): pixelated_mail = PixelatedMail.from_leap_mail(test_helper.leap_mail(extra_flags=['tag_tag_work_tag_'])) self.assertIn(Tag('tag_work_tag_'), pixelated_mail.tags) - def from_dict(self): + def test_from_dict(self): mail_dict = { 'body': 'Este \xe9 o corpo', 'header': { @@ -58,10 +58,10 @@ class TestPixelatedMail(unittest.TestCase): mail = PixelatedMail.from_dict(mail_dict) - self.assertEqual(mail.headers.cc, ['cc@pixelated.com']) - self.assertEqual(mail.headers.to, ['to@pixelated.com']) - self.assertEqual(mail.headers.bcc, ['bcc@pixelated.com']) - self.assertEqual(mail.headers.subject, 'Oi') + self.assertEqual(mail.headers['cc'], ['cc@pixelated.com']) + self.assertEqual(mail.headers['to'], ['to@pixelated.com']) + self.assertEqual(mail.headers['bcc'], ['bcc@pixelated.com']) + self.assertEqual(mail.headers['subject'], 'Oi') self.assertEqual(mail.ident, '') self.assertEqual(mail.tags, ['sent']) self.assertEqual(mail.body, 'Este \xe9 o corpo') -- cgit v1.2.3