diff options
Diffstat (limited to 'service/test/adapter')
-rw-r--r-- | service/test/adapter/pixelated_mail_test.py | 5 | ||||
-rw-r--r-- | service/test/adapter/test_tag_service.py | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/service/test/adapter/pixelated_mail_test.py b/service/test/adapter/pixelated_mail_test.py index e364f7a9..9d7176a4 100644 --- a/service/test/adapter/pixelated_mail_test.py +++ b/service/test/adapter/pixelated_mail_test.py @@ -17,7 +17,6 @@ import unittest import pixelated.support.date from pixelated.adapter.pixelated_mail import PixelatedMail -from pixelated.adapter.pixelated_mail import Status import test_helper @@ -74,7 +73,7 @@ class TestPixelatedMail(unittest.TestCase): self.assertEqual('date now', mail.headers['date']) def test_update_tags_return_a_set_for_added_tags_and_a_set_for_removed_ones(self): - pixelated_mail = PixelatedMail.from_leap_mail(test_helper.leap_mail(extra_headers={'X-tags': ['custom_1', 'custom_2']})) + pixelated_mail = PixelatedMail.from_leap_mail(test_helper.leap_mail(extra_headers={'X-tags': '["custom_1", "custom_2"]'})) added, removed = pixelated_mail.update_tags(set(['custom_1', 'custom_3'])) self.assertEquals(set(['custom_3']), added) self.assertEquals(set(['custom_2']), removed) @@ -116,6 +115,6 @@ class TestPixelatedMail(unittest.TestCase): def test_mark_as_read(self): mail = PixelatedMail.from_leap_mail(test_helper.leap_mail(flags=[])) - read_mail = mail.mark_as_read() + mail.mark_as_read() self.assertEquals(mail.leap_mail.setFlags.call_args[0], (('\\Seen',), 1)) diff --git a/service/test/adapter/test_tag_service.py b/service/test/adapter/test_tag_service.py index 20888092..b3a68c2b 100644 --- a/service/test/adapter/test_tag_service.py +++ b/service/test/adapter/test_tag_service.py @@ -30,8 +30,8 @@ class TagServiceTest(unittest.TestCase): self.tag_service = TagService(tag_index=self.tag_index) def test_index_is_initialized_with_mail_tags_if_empty(self): - mail_one = PixelatedMail.from_leap_mail(test_helper.leap_mail(uid=0, extra_headers={'X-Tags': ['tag_1']})) - mail_two = PixelatedMail.from_leap_mail(test_helper.leap_mail(uid=1, extra_headers={'X-Tags': ['tag_2']})) + mail_one = PixelatedMail.from_leap_mail(test_helper.leap_mail(uid=0, extra_headers={'X-Tags': '["tag_1"]'}), test_helper.leap_mailbox()) + mail_two = PixelatedMail.from_leap_mail(test_helper.leap_mail(uid=1, extra_headers={'X-Tags': '["tag_2"]'}), test_helper.leap_mailbox()) mails = [mail_one, mail_two] self.tag_service.load_index(mails) |