From 8f2e9f66ae07b849c508313e245af10e4be1d5ca Mon Sep 17 00:00:00 2001 From: Roald de Vries Date: Wed, 23 Nov 2016 11:12:26 +0100 Subject: readability --- service/test/unit/resources/test_archive_resource.py | 8 ++------ 1 file 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) -- cgit v1.2.3