From: Daira Hopwood Date: Thu, 8 Oct 2015 13:42:47 +0000 (+0100) Subject: Simplify the cleanup_Alice_and_Bob callback. X-Git-Url: https://git.rkrishnan.org/simplejson/components/%22file:/frontends/webapi.rst?a=commitdiff_plain;h=27fb403dad61591f3574a09cd128bef50b7a206f;p=tahoe-lafs%2Ftahoe-lafs.git Simplify the cleanup_Alice_and_Bob callback. Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/test/test_magic_folder.py b/src/allmydata/test/test_magic_folder.py index 5e2afa00..9608b772 100644 --- a/src/allmydata/test/test_magic_folder.py +++ b/src/allmydata/test/test_magic_folder.py @@ -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):