summaryrefslogtreecommitdiff
path: root/service/test/unit/resources/test_archive_resource.py
diff options
context:
space:
mode:
Diffstat (limited to 'service/test/unit/resources/test_archive_resource.py')
-rw-r--r--service/test/unit/resources/test_archive_resource.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/service/test/unit/resources/test_archive_resource.py b/service/test/unit/resources/test_archive_resource.py
index 186078a5..1876f897 100644
--- a/service/test/unit/resources/test_archive_resource.py
+++ b/service/test/unit/resources/test_archive_resource.py
@@ -19,12 +19,8 @@ class TestArchiveResource(unittest.TestCase):
content = mock()
when(content).read().thenReturn(json.dumps({'idents': ['1', '2']}))
- d1 = defer.Deferred()
- d1.callback(None)
- when(self.mail_service).archive_mail('1').thenReturn(d1)
- d2 = defer.Deferred()
- d2.callback(None)
- when(self.mail_service).archive_mail('2').thenReturn(d2)
+ when(self.mail_service).archive_mail('1').thenReturn(defer.succeed(None))
+ when(self.mail_service).archive_mail('2').thenReturn(defer.succeed(None))
request.content = content
d = self.web.get(request)