diff options
author | Lisa Junger <ljunger@thoughtworks.com> | 2014-10-20 12:20:04 +0200 |
---|---|---|
committer | Lisa Junger <ljunger@thoughtworks.com> | 2014-10-20 12:26:30 +0200 |
commit | 6ddbfc0e6399d9b994ecd4c2c4b040aa6d364eac (patch) | |
tree | 5428dab74ddb626903dbb5be0e82ef82ce7d21b1 /service/test | |
parent | 15321219b05c5eb7f29e45587fcaa3c45e9a9dd7 (diff) |
adds permant deleted for trashed messages.
Diffstat (limited to 'service/test')
-rw-r--r-- | service/test/integration/delete_mail_test.py | 8 | ||||
-rw-r--r-- | service/test/support/integration_helper.py | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/service/test/integration/delete_mail_test.py b/service/test/integration/delete_mail_test.py index 894f84bf..10c09e7a 100644 --- a/service/test/integration/delete_mail_test.py +++ b/service/test/integration/delete_mail_test.py @@ -39,3 +39,11 @@ class DeleteMailTest(unittest.TestCase, SoledadTestBase): self.assertEquals(0, len(inbox_mails)) trash_mails = self.get_mails_by_tag('trash') self.assertEquals(1, len(trash_mails)) + + def test_delete_mail_when_trashing_mail_from_trash_mailbox(self): + mails = self.add_multiple_to_mailbox(1, 'trash') + self.delete_mail(mails[0].ident) + + trash_mails = self.get_mails_by_tag('trash') + + self.assertEqual(0, len(trash_mails)) diff --git a/service/test/support/integration_helper.py b/service/test/support/integration_helper.py index 3667001f..e71da443 100644 --- a/service/test/support/integration_helper.py +++ b/service/test/support/integration_helper.py @@ -220,12 +220,14 @@ class SoledadTestBase: self.search_engine.index_mail(mail) def add_multiple_to_mailbox(self, num, mailbox='', flags=[], tags=[]): + mails = [] for _ in range(num): input_mail = MailBuilder().with_status(flags).with_tags(tags).build_input_mail() mail = self.mailboxes._create_or_get(mailbox).add(input_mail) + mails.append(mail) mail.update_tags(input_mail.tags) self.search_engine.index_mail(mail) - + return mails class ResponseMail: def __init__(self, mail_dict): |