diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-08-06 10:17:56 +0200 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-08-11 17:00:33 +0200 |
commit | 5c978727af0d6a67bf8456a8bc6bd13b5c87fc1e (patch) | |
tree | 445d935df9d258ef3a5ae468363229729d39ec82 /service/test/unit | |
parent | 5081bc601334a163c362d6a049cf13c837b0fc42 (diff) |
Merge test method SearchableMailstore.add_mail.
Setup is the same & makes test consistent with other tests
Diffstat (limited to 'service/test/unit')
-rw-r--r-- | service/test/unit/adapter/mailstore/test_searchable_mailstore.py | 11 |
1 files changed, 1 insertions, 10 deletions
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 |