def test_invoke_all_function_in_list(self, password): network = 'privateNet' wallet_file_name = 'wallet.json' password.return_value = 'password' project_path = os.path.join(os.getcwd(), 'test_file', 'test_invoke') Invoke.invoke_all_function_in_list(wallet_file_name, project_path, network, 'Name,BalanceOf')
def invoke_cmd(ctx, network, wallet, functions): """ Invoke the function list in punica-config. """ project_dir = ctx.obj['PROJECT_DIR'] try: Invoke.invoke_all_function_in_list(wallet, project_dir, network, functions) except (PunicaException, SDKException) as e: print('An error occur...') print(e) print('Punica will exist...') exit(1)
def invoke_cmd(ctx, network, wallet, functions, config, preexec): """ Invoke the function list in default-config or specify config. """ project_dir = ctx.obj['PROJECT_DIR'] if ctx.invoked_subcommand is None: try: Invoke.invoke_all_function_in_list(wallet, project_dir, network, functions, config, preexec) except (PunicaException, SDKException) as e: print('An error occur...') print(e) print('Punica will exit...') exit(1) else: pass