diff options
author | Victor Shyba <victor.shyba@gmail.com> | 2015-11-23 19:51:12 -0300 |
---|---|---|
committer | Victor Shyba <victor.shyba@gmail.com> | 2015-11-23 19:51:12 -0300 |
commit | 27e3ca71f920083e8bf1599facc2cc4638f8efcf (patch) | |
tree | 2b1da538e01c110df510ab58b766106124abfc48 /service/test/unit/adapter | |
parent | 82c16b35798537302fecbf40ed76b0051e23ddb3 (diff) |
Return 422 if deletion failed
This is needed for protecting against concurrent saves on drafts.
--Issue #512
Diffstat (limited to 'service/test/unit/adapter')
-rw-r--r-- | service/test/unit/adapter/test_draft_service.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/service/test/unit/adapter/test_draft_service.py b/service/test/unit/adapter/test_draft_service.py index 628b95d4..bf5e18c5 100644 --- a/service/test/unit/adapter/test_draft_service.py +++ b/service/test/unit/adapter/test_draft_service.py @@ -23,6 +23,7 @@ class DraftServiceTest(unittest.TestCase): def test_update_draft(self): mail = InputMail.from_dict(test_helper.mail_dict()) + when(self.mail_store).delete_mail(mail.ident).thenReturn(defer.succeed(True)) when(self.mail_store).add_mail('DRAFTS', mail.raw).thenReturn(defer.succeed(LeapMail('id', 'DRAFTS'))) self.draft_service.update_draft(mail.ident, mail) |