From 2745e1983aad57f2f18b745b31dbf6629590b26a Mon Sep 17 00:00:00 2001 From: Patrick Maia and Victor Shyba Date: Wed, 27 Aug 2014 14:25:24 +0000 Subject: uses Tag.from_flags method to extract tags on PixelatedMail --- service/test/adapter/pixelated_mail_test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'service/test/adapter') diff --git a/service/test/adapter/pixelated_mail_test.py b/service/test/adapter/pixelated_mail_test.py index 841a53f2..8d1b70df 100644 --- a/service/test/adapter/pixelated_mail_test.py +++ b/service/test/adapter/pixelated_mail_test.py @@ -17,7 +17,6 @@ import unittest from pixelated.adapter.pixelated_mail import PixelatedMail from pixelated.adapter.tag import Tag -from pixelated.adapter.status import Status import test_helper @@ -43,6 +42,11 @@ 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 test_non_tags_flags_are_ignored(self): + pixelated_mail = PixelatedMail.from_leap_mail(test_helper.leap_mail(leap_flags=['\\Recent'], + extra_flags=['this_is_not_a_tag', 'tag_custom_tag'])) + self.assertEquals(set([Tag('custom_tag'), Tag('inbox')]), pixelated_mail.tags) + def test_from_dict(self): mail_dict = { 'body': 'Este \xe9 o corpo', -- cgit v1.2.3