From 5c978727af0d6a67bf8456a8bc6bd13b5c87fc1e Mon Sep 17 00:00:00 2001 From: Folker Bernitt Date: Thu, 6 Aug 2015 10:17:56 +0200 Subject: Merge test method SearchableMailstore.add_mail. Setup is the same & makes test consistent with other tests --- .../test/unit/adapter/mailstore/test_searchable_mailstore.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'service/test/unit') diff --git a/service/test/unit/adapter/mailstore/test_searchable_mailstore.py b/service/test/unit/adapter/mailstore/test_searchable_mailstore.py index cae6b2f3..e63b683f 100644 --- a/service/test/unit/adapter/mailstore/test_searchable_mailstore.py +++ b/service/test/unit/adapter/mailstore/test_searchable_mailstore.py @@ -42,19 +42,10 @@ class TestSearchableMailStore(TestCase): leap_mail = LeapMail('id', ANY_MAILBOX) when(self.delegate_mail_store).add_mail(ANY_MAILBOX, mail).thenReturn(defer.succeed(leap_mail)) - yield self.store.add_mail(ANY_MAILBOX, mail) + result = yield self.store.add_mail(ANY_MAILBOX, mail) verify(self.delegate_mail_store).add_mail(ANY_MAILBOX, mail) verify(self.search_index).index_mail(leap_mail) - - @defer.inlineCallbacks - def test_add_mail_returns_stored_mail(self): - mail = self._load_mail_from_file('mbox00000000') - leap_mail = LeapMail('id', ANY_MAILBOX) - when(self.delegate_mail_store).add_mail(ANY_MAILBOX, mail).thenReturn(defer.succeed(leap_mail)) - - result = yield self.store.add_mail(ANY_MAILBOX, mail) - self.assertEqual(leap_mail, result) @defer.inlineCallbacks -- cgit v1.2.3