diff options
-rw-r--r-- | service/pixelated/adapter/mailstore/searchable_mailstore.py | 3 | ||||
-rw-r--r-- | service/test/unit/adapter/mailstore/test_searchable_mailstore.py | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/service/pixelated/adapter/mailstore/searchable_mailstore.py b/service/pixelated/adapter/mailstore/searchable_mailstore.py index 264f41cc..d4e5bd24 100644 --- a/service/pixelated/adapter/mailstore/searchable_mailstore.py +++ b/service/pixelated/adapter/mailstore/searchable_mailstore.py @@ -60,6 +60,9 @@ class SearchableMailStore(object): # implementes MailStore self._search_engine.index_mail(copied_mail) defer.returnValue(copied_mail) + def delete_mailbox(self, mailbox_name): + raise NotImplementedError() + def __getattr__(self, name): """ Acts like method missing. If a method of MailStore is not implemented in this class, diff --git a/service/test/unit/adapter/mailstore/test_searchable_mailstore.py b/service/test/unit/adapter/mailstore/test_searchable_mailstore.py index e63b683f..8c571201 100644 --- a/service/test/unit/adapter/mailstore/test_searchable_mailstore.py +++ b/service/test/unit/adapter/mailstore/test_searchable_mailstore.py @@ -96,6 +96,14 @@ class TestSearchableMailStore(TestCase): self.assertEqual(mail, result) + @defer.inlineCallbacks + def test_delete_mailbox_is_not_implemented(self): + try: + yield self.store.delete_mailbox(ANY_MAILBOX) + self.fail("Should raise NotImplementedError") + except NotImplementedError: + pass + def _load_mail_from_file(self, mail_file): mailset_dir = pkg_resources.resource_filename('test.unit.fixtures', 'mailset') mail_file = os.path.join(mailset_dir, 'new', mail_file) |