def test_help_synopsis(self): self.basedir = "cli/MagicFolder/help_synopsis" os.makedirs(self.basedir) o = magic_folder_cli.CreateOptions() o.parent = magic_folder_cli.MagicFolderCommand() o.parent.getSynopsis()
def test_create_invite_join_failure(self): self.basedir = "cli/MagicFolder/create-invite-join-failure" os.makedirs(self.basedir) o = magic_folder_cli.CreateOptions() o.parent = magic_folder_cli.MagicFolderCommand() o.parent['node-directory'] = self.basedir try: o.parseArgs("magic:", "Alice", "-foo") except usage.UsageError as e: self.failUnlessIn("cannot start with '-'", str(e)) else: self.fail("expected UsageError")