From db8336579936ba4628a7636508a1faa91599b816 Mon Sep 17 00:00:00 2001 From: Folker Bernitt Date: Tue, 21 Jul 2015 09:18:56 +0000 Subject: Fixed missing yield in test_mail.py. --- service/test/unit/adapter/test_mail.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'service') diff --git a/service/test/unit/adapter/test_mail.py b/service/test/unit/adapter/test_mail.py index 2b512313..4751bfdd 100644 --- a/service/test/unit/adapter/test_mail.py +++ b/service/test/unit/adapter/test_mail.py @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU Affero General Public License # along with Pixelated. If not, see . -import unittest +from twisted.trial import unittest import pixelated.support.date from pixelated.adapter.model.mail import PixelatedMail, InputMail, HEADERS_KEY @@ -27,6 +27,7 @@ from datetime import datetime import os import json import pkg_resources +from twisted.internet import defer class TestPixelatedMail(unittest.TestCase): @@ -90,11 +91,12 @@ class TestPixelatedMail(unittest.TestCase): self.assertEqual(mail.headers['Date'], date_expected) + @defer.inlineCallbacks def test_update_tags_return_a_set_with_the_current_tags(self): soledad_docs = test_helper.leap_mail(extra_headers={'X-tags': '["custom_1", "custom_2"]'}) pixelated_mail = PixelatedMail.from_soledad(*soledad_docs, soledad_querier=self.querier) - current_tags = pixelated_mail.update_tags({'custom_1', 'custom_3'}) + current_tags = yield pixelated_mail.update_tags({'custom_1', 'custom_3'}) self.assertEquals({'custom_3', 'custom_1'}, current_tags) def test_mark_as_read(self): -- cgit v1.2.3