]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Cosmetics.
authorDaira Hopwood <daira@jacaranda.org>
Tue, 20 Oct 2015 16:27:38 +0000 (17:27 +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_cli_magic_folder.py
src/allmydata/test/test_magic_folder.py

index 3dc6cbe65126b1373b67e589c800175d04f62f79..4dc1a43f1b94f4fdc9f8c3f40a6d0c96c7473a48 100644 (file)
@@ -18,7 +18,6 @@ from allmydata import uri
 
 
 class MagicFolderCLITestMixin(CLITestMixin, GridTestMixin):
-
     def do_create_magic_folder(self, client_num):
         d = self.do_cli("magic-folder", "create", "magic:", client_num=client_num)
         def _done((rc,stdout,stderr)):
@@ -80,7 +79,7 @@ class MagicFolderCLITestMixin(CLITestMixin, GridTestMixin):
 
     def create_invite_join_magic_folder(self, nickname, local_dir):
         d = self.do_cli("magic-folder", "create", u"magic:", nickname, local_dir)
-        def _done((rc,stdout,stderr)):
+        def _done((rc, stdout, stderr)):
             self.failUnless(rc == 0)
             return (rc,stdout,stderr)
         d.addCallback(_done)
@@ -90,8 +89,8 @@ class MagicFolderCLITestMixin(CLITestMixin, GridTestMixin):
             self.collective_dirnode = client.create_node_from_uri(self.collective_dircap)
             self.upload_dirnode     = client.create_node_from_uri(self.upload_dircap)
         d.addCallback(get_alice_caps)
-        d.addCallback(lambda x: self.check_joined_config(0, self.upload_dircap))
-        d.addCallback(lambda x: self.check_config(0, local_dir))
+        d.addCallback(lambda ign: self.check_joined_config(0, self.upload_dircap))
+        d.addCallback(lambda ign: self.check_config(0, local_dir))
         return d
 
     def cleanup(self, res):
@@ -132,32 +131,32 @@ class MagicFolderCLITestMixin(CLITestMixin, GridTestMixin):
         # Alice creates a Magic Folder,
         # invites herself then and joins.
         d = self.do_create_magic_folder(0)
-        d.addCallback(lambda x: self.do_invite(0, u"Alice\u00F8"))
+        d.addCallback(lambda ign: self.do_invite(0, u"Alice\u00F8"))
         def get_invitecode(result):
             self.invitecode = result[1].strip()
         d.addCallback(get_invitecode)
-        d.addCallback(lambda x: self.do_join(0, alice_magic_dir, self.invitecode))
-        def get_alice_caps(x):
+        d.addCallback(lambda ign: self.do_join(0, alice_magic_dir, self.invitecode))
+        def get_alice_caps(ign):
             self.alice_collective_dircap, self.alice_upload_dircap = self.get_caps_from_files(0)
         d.addCallback(get_alice_caps)
-        d.addCallback(lambda x: self.check_joined_config(0, self.alice_upload_dircap))
-        d.addCallback(lambda x: self.check_config(0, alice_magic_dir))
+        d.addCallback(lambda ign: self.check_joined_config(0, self.alice_upload_dircap))
+        d.addCallback(lambda ign: self.check_config(0, alice_magic_dir))
         def get_Alice_magicfolder(result):
             self.alice_magicfolder = self.init_magicfolder(0, self.alice_upload_dircap, self.alice_collective_dircap, alice_magic_dir, alice_clock)
             return result
         d.addCallback(get_Alice_magicfolder)
 
         # Alice invites Bob. Bob joins.
-        d.addCallback(lambda x: self.do_invite(0, u"Bob\u00F8"))
+        d.addCallback(lambda ign: self.do_invite(0, u"Bob\u00F8"))
         def get_invitecode(result):
             self.invitecode = result[1].strip()
         d.addCallback(get_invitecode)
-        d.addCallback(lambda x: self.do_join(1, bob_magic_dir, self.invitecode))
-        def get_bob_caps(x):
+        d.addCallback(lambda ign: self.do_join(1, bob_magic_dir, self.invitecode))
+        def get_bob_caps(ign):
             self.bob_collective_dircap, self.bob_upload_dircap = self.get_caps_from_files(1)
         d.addCallback(get_bob_caps)
-        d.addCallback(lambda x: self.check_joined_config(1, self.bob_upload_dircap))
-        d.addCallback(lambda x: self.check_config(1, bob_magic_dir))
+        d.addCallback(lambda ign: self.check_joined_config(1, self.bob_upload_dircap))
+        d.addCallback(lambda ign: self.check_config(1, bob_magic_dir))
         def get_Bob_magicfolder(result):
             self.bob_magicfolder = self.init_magicfolder(1, self.bob_upload_dircap, self.bob_collective_dircap, bob_magic_dir, bob_clock)
             return result
@@ -178,15 +177,15 @@ class CreateMagicFolder(MagicFolderCLITestMixin, unittest.TestCase):
         self.set_up_grid()
         self.local_dir = argv_to_abspath(os.path.join(self.basedir, "magic"))
         d = self.do_create_magic_folder(0)
-        d.addCallback(lambda x: self.do_invite(0, u"Alice"))
+        d.addCallback(lambda ign: self.do_invite(0, u"Alice"))
         def get_invite((rc,stdout,stderr)):
             self.invite_code = stdout.strip()
         d.addCallback(get_invite)
         d.addCallback(lambda x: self.do_join(0, self.local_dir, self.invite_code))
-        def get_caps(x):
+        def get_caps(ign):
             self.collective_dircap, self.upload_dircap = self.get_caps_from_files(0)
         d.addCallback(get_caps)
-        d.addCallback(lambda x: self.check_joined_config(0, self.upload_dircap))
+        d.addCallback(lambda ign: self.check_joined_config(0, self.upload_dircap))
         d.addCallback(lambda x: self.check_config(0, self.local_dir))
         return d
 
@@ -195,7 +194,7 @@ class CreateMagicFolder(MagicFolderCLITestMixin, unittest.TestCase):
         self.set_up_grid()
         self.local_dir = os.path.join(self.basedir, "magic")
         d = self.do_cli("magic-folder", "create", "m a g i c:", client_num=0)
-        def _done((rc,stdout,stderr)):
+        def _done((rc, stdout, stderr)):
             self.failIfEqual(rc, 0)
             self.failUnlessIn("Alias names cannot contain spaces.", stderr)
         d.addCallback(_done)
@@ -206,14 +205,14 @@ class CreateMagicFolder(MagicFolderCLITestMixin, unittest.TestCase):
         self.set_up_grid()
         self.local_dir = os.path.join(self.basedir, "magic")
         d = self.do_cli("magic-folder", "create", u"magic:", u"Alice", self.local_dir)
-        def _done((rc,stdout,stderr)):
+        def _done((rc, stdout, stderr)):
             self.failUnless(rc == 0)
             return (rc,stdout,stderr)
         d.addCallback(_done)
-        def get_caps(x):
+        def get_caps(ign):
             self.collective_dircap, self.upload_dircap = self.get_caps_from_files(0)
         d.addCallback(get_caps)
-        d.addCallback(lambda x: self.check_joined_config(0, self.upload_dircap))
+        d.addCallback(lambda ign: self.check_joined_config(0, self.upload_dircap))
         d.addCallback(lambda x: self.check_config(0, self.local_dir))
         return d
 
index 39a71ed1252942124d2c3e91130e87911043ef13..5995c11b4ccde3dd789ea1409794f09045c542a7 100644 (file)
@@ -67,7 +67,6 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual
         fileutil.make_dirs(self.basedir)
         db = self._createdb()
 
-
         relpath1 = u"myFile1"
         pathinfo = fileutil.PathInfo(isdir=False, isfile=True, islink=False,
                                      exists=True, size=1, mtime=123, ctime=456)