summaryrefslogtreecommitdiff
path: root/mail/src/leap
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2014-09-10 18:14:29 -0500
committerKali Kaneko <kali@leap.se>2014-09-10 18:17:00 -0500
commiteb844bda5afa116be3c60c68bf97522511d5143a (patch)
tree2dfa18209b1f760b955a7bb3dce62d5b80289a42 /mail/src/leap
parentf072f75dc4ae0bcb2dbf57f1d374a1e53913eed4 (diff)
add test for empty mailbox creation
Diffstat (limited to 'mail/src/leap')
-rw-r--r--mail/src/leap/mail/imap/tests/test_imap.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/mail/src/leap/mail/imap/tests/test_imap.py b/mail/src/leap/mail/imap/tests/test_imap.py
index 980e46e..631a2c1 100644
--- a/mail/src/leap/mail/imap/tests/test_imap.py
+++ b/mail/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}.
"""