diff options
author | Roald de Vries <rdevries@thoughtworks.com> | 2016-11-23 11:12:26 +0100 |
---|---|---|
committer | Roald de Vries <rdevries@thoughtworks.com> | 2016-11-23 11:12:26 +0100 |
commit | 20df0b4236b9939776bf15d955d36501566cb486 (patch) | |
tree | 5b10f5ae07a400c6dffb43d95a66217f90c94399 | |
parent | 59644fafb501422295d430912d8711a7d11195b5 (diff) |
readability
-rw-r--r-- | service/test/unit/resources/test_archive_resource.py | 8 |
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) |