summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorRoald de Vries <rdevries@thoughtworks.com>2016-11-23 11:12:26 +0100
committerRoald de Vries <rdevries@thoughtworks.com>2016-11-23 11:41:03 +0100
commit8f2e9f66ae07b849c508313e245af10e4be1d5ca (patch)
tree2ff86007b4a20ee1e45f74b5d11329619ffd22fd /service
parentfe06c3a839bdc13384250924a4a30d9dd3455fc7 (diff)
readability
Diffstat (limited to 'service')
-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)