]> 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)
committermeejah <meejah@meejah.ca>
Tue, 19 Jan 2016 22:48:37 +0000 (15:48 -0700)
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):