From: Daira Hopwood Date: Tue, 8 Sep 2015 14:26:15 +0000 (+0100) Subject: Cleanup of _restart_client. X-Git-Url: https://git.rkrishnan.org/pf/content/en/service?a=commitdiff_plain;h=6b2a81957af440af912995912b0edc0570204a26;p=tahoe-lafs%2Ftahoe-lafs.git Cleanup of _restart_client. Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/test/test_magic_folder.py b/src/allmydata/test/test_magic_folder.py index 7c21a087..4d4a0962 100644 --- a/src/allmydata/test/test_magic_folder.py +++ b/src/allmydata/test/test_magic_folder.py @@ -46,13 +46,14 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual def _restart_client(self, ign): print "_restart_client" d = self.restart_client() - def _restarted(ign): - print "_restarted" - self.magicfolder = self.get_client().getServiceNamed('magic-folder') - return self.magicfolder.uploader.started_d - d.addCallback(_restarted) + d.addCallback(self._wait_until_started) return d + def _wait_until_started(self, ign): + print "_wait_until_started" + self.magicfolder = self.get_client().getServiceNamed('magic-folder') + return self.magicfolder.uploader.started_d + def _create_magicfolder(self, ign): dbfile = abspath_expanduser_unicode(u"magicfolderdb.sqlite", base=self.basedir) self.magicfolder = MagicFolder(self.get_client(), self.upload_dircap, self.collective_dircap, self.local_dir,