From eba412b4338fe5cfce0155bb1aabfe40025c036c Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Wed, 10 Sep 2014 18:14:29 -0500 Subject: add test for empty mailbox creation --- src/leap/mail/imap/tests/test_imap.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/leap/mail/imap/tests/test_imap.py b/src/leap/mail/imap/tests/test_imap.py index 980e46e..631a2c1 100644 --- a/src/leap/mail/imap/tests/test_imap.py +++ b/src/leap/mail/imap/tests/test_imap.py @@ -1106,8 +1106,21 @@ class LeapIMAP4ServerTestCase(IMAP4HelperMixin, unittest.TestCase): self.assertItemsEqual(self.results, [1, 3]) -class IMAP4ServerSearchTestCase(IMAP4HelperMixin, unittest.TestCase): +class AccountTestCase(IMAP4HelperMixin, unittest.TestCase): + """ + Test the Account. + """ + def _create_empty_mailbox(self): + LeapIMAPServer.theAccount.addMailbox('') + + def _create_one_mailbox(self): + LeapIMAPServer.theAccount.addMailbox('one') + def test_illegalMailboxCreate(self): + self.assertRaises(AssertionError, self._create_empty_mailbox) + + +class IMAP4ServerSearchTestCase(IMAP4HelperMixin, unittest.TestCase): """ Tests for the behavior of the search_* functions in L{imap5.IMAP4Server}. """ -- cgit v1.2.3