Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Commit

Permalink
test another copy error
Browse files Browse the repository at this point in the history
  • Loading branch information
arnisoph committed Dec 20, 2015
1 parent a7e89e8 commit 066f347
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/integration/test_imap.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def test_copy_mails(self):

self.assertEqual(imapconn.disconnect(), (True, b'Logging out'))

def test_copy_mails_nonexisting_destination(self):
def test_copy_mails_errors(self):
username, password = self.create_imap_user()
imapconn = self.create_basic_imap_object(username, password)
self.assertEqual(imapconn.connect(), (True, b'Logged in'))
Expand All @@ -295,6 +295,10 @@ def test_copy_mails_nonexisting_destination(self):
self.assertEqual(imapconn.fetch_mails(uids=[1], mailbox='INBOX')[1][1].get('message-id'), message_id)
self.assertEqual(imapconn.fetch_mails(uids=[1], mailbox='CustomMailbox')[1][1].get('message-id'), message_id)

self.assertEqual(imapconn.copy_mails(message_ids=[message_id],
source='INBOX',
destination=''), (False, 'copy failed: [CANNOT] Invalid mailbox name: Name is empty'))

self.assertEqual(imapconn.disconnect(), (True, b'Logging out'))

def test_copy_mails_testmode(self):
Expand Down

0 comments on commit 066f347

Please sign in to comment.