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)):
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)
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):
# 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
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
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)
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