]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Simplify the cleanup_Alice_and_Bob callback.
authorDaira Hopwood <daira@jacaranda.org>
Thu, 8 Oct 2015 13:42:47 +0000 (14:42 +0100)
committerDaira Hopwood <daira@jacaranda.org>
Mon, 28 Dec 2015 16:18:52 +0000 (16:18 +0000)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/test/test_magic_folder.py

index 5e2afa00aa0a9ccce97a38f0c90e22fc7c75f40e..9608b772611a3a916b6a319249d97c867907506e 100644 (file)
@@ -411,16 +411,16 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual
             print "cleanup alice bob test\n"
             d = defer.succeed(None)
             d.addCallback(lambda ign: self.alice_magicfolder.finish())
+            alice_clock.advance(0)
 
-            def clean_bob(_):
+            def clean_bob(ign):
                 d2 = self.bob_magicfolder.finish()
-                d2.addCallback(lambda ign: result)
                 bob_clock.advance(0)
                 return d2
             d.addCallback(clean_bob)
-            alice_clock.advance(0)
+            d.addCallback(lambda ign: result)
             return d
-        d.addCallback(cleanup_Alice_and_Bob)
+        d.addBoth(cleanup_Alice_and_Bob)
         return d
 
 class MockTest(MagicFolderTestMixin, unittest.TestCase):