diff options
author | Victor Shyba <victor.shyba@gmail.com> | 2015-11-23 11:24:40 -0300 |
---|---|---|
committer | Victor Shyba <victor.shyba@gmail.com> | 2015-11-23 11:24:40 -0300 |
commit | 8349915f538e670cd86b7327e31fd6bd87500db2 (patch) | |
tree | f579f8909ae29916c298d4d2d0ed737087bc4815 /service/test | |
parent | 3281c5eade3fadb32e199210ace922e3db8f6da6 (diff) |
No more 'need to create before delete'
Checking for mdoc existence before trying to delete a deleted mail.
--Issue #512
Diffstat (limited to 'service/test')
-rw-r--r-- | service/test/integration/test_leap_mailstore.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/service/test/integration/test_leap_mailstore.py b/service/test/integration/test_leap_mailstore.py index 9a7f94ae..f72a99be 100644 --- a/service/test/integration/test_leap_mailstore.py +++ b/service/test/integration/test_leap_mailstore.py @@ -190,3 +190,13 @@ class LeapMailStoreTest(SoledadTestBase): self.assertEqual(replying['single'], 'me@pixelated.org') self.assertEqual(replying['all']['to-field'], [u'addr1@pixelated.org', u'me@pixelated.org']) self.assertEqual(replying['all']['cc-field'], []) + + @defer.inlineCallbacks + def test_deleting_a_deleted_mail_doesnt_raise_errors(self): + InputMail.FROM_EMAIL_ADDRESS = 'me@pixelated.org' + mail = load_mail_from_file('mbox00000000') + yield self.mail_store.add_mailbox('INBOX') + mail = yield self.mail_store.add_mail('INBOX', mail.as_string()) + + yield self.mail_store.delete_mail(mail.ident) + yield self.mail_store.delete_mail(mail.ident) |