diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-07-27 17:27:24 +0200 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-08-11 17:00:28 +0200 |
commit | 6d72d76f7753004c84d1a0eed6667b551c11b626 (patch) | |
tree | c66c8973389cd4b00a5356b87c5024e49aa7d30f /service/test/integration/test_leap_mailstore.py | |
parent | bf96b1077bdd777400a40fc2fe3acc83552d70de (diff) |
Added add mailbox and add message behaviour.
- Add message does not yet mail index
Diffstat (limited to 'service/test/integration/test_leap_mailstore.py')
-rw-r--r-- | service/test/integration/test_leap_mailstore.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/service/test/integration/test_leap_mailstore.py b/service/test/integration/test_leap_mailstore.py index f666b645..dbe0ffb0 100644 --- a/service/test/integration/test_leap_mailstore.py +++ b/service/test/integration/test_leap_mailstore.py @@ -26,8 +26,9 @@ from uuid import uuid4 class LeapMailStoreTest(SoledadTestBase): + @defer.inlineCallbacks def setUp(self): - super(LeapMailStoreTest, self).setUp() + yield super(LeapMailStoreTest, self).setUp() self.adaptor = SoledadMailAdaptor() self.mbox_uuid = str(uuid4()) self.store = LeapMailStore(self.soledad) @@ -53,6 +54,14 @@ class LeapMailStoreTest(SoledadTestBase): self.assertEqual('Itaque consequatur repellendus provident sunt quia.', mails[0].subject) @defer.inlineCallbacks + def test_add_mail(self): + yield self.adaptor.initialize_store(self.soledad) + mail = _load_mail_from_file('mbox00000000') + mailbox = yield self.store.add_mailbox('INBOX') + + msg = yield self.store.add_mail('INBOX', mail.as_string()) + + @defer.inlineCallbacks def _create_mail_in_soledad(self, mail): message = self._convert_mail_to_leap_message(mail) yield self.adaptor.initialize_store(self.soledad) |