From ff739a697af362647c17a4010984439a03b673df Mon Sep 17 00:00:00 2001 From: Folker Bernitt Date: Tue, 28 Jul 2015 14:27:01 +0200 Subject: Added tests to get mails within a mailbox. --- service/test/integration/test_leap_mailstore.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'service/test/integration/test_leap_mailstore.py') diff --git a/service/test/integration/test_leap_mailstore.py b/service/test/integration/test_leap_mailstore.py index a71df74d..1cca6903 100644 --- a/service/test/integration/test_leap_mailstore.py +++ b/service/test/integration/test_leap_mailstore.py @@ -67,6 +67,16 @@ class LeapMailStoreTest(SoledadTestBase): self.assertIsNone(deleted_msg) + @defer.inlineCallbacks + def test_get_mailbox_mail_ids(self): + mail = _load_mail_from_file('mbox00000000') + yield self.store.add_mailbox('INBOX') + yield self.store.add_mail('INBOX', mail.as_string()) + + mails = yield self.store.get_mailbox_mail_ids('INBOX') + + self.assertEqual(1, len(mails)) + @defer.inlineCallbacks def _create_mail_in_soledad(self, mail): message = self._convert_mail_to_leap_message(mail) -- cgit v1.2.3