diff --git a/silkaj/money/transfer.py b/silkaj/money/transfer.py index e7af1ab6d0b9c6b86735215fccd44575b89e1a3c..8a3d22a3ea1328aa6c13709caf24c65a13725161 100644 --- a/silkaj/money/transfer.py +++ b/silkaj/money/transfer.py @@ -59,7 +59,7 @@ MAX_OUTPUTS = 93 NBR_ISSUERS = 1 -@click.command("tx", help="Send transaction") +@click.command("transfer", help="Transfer money") @click.option( "amounts", "--amount", diff --git a/tests/money/test_transfer.py b/tests/money/test_transfer.py index 880eae8bb89f621594ad798c4aa8636343622dfe..7ae642fb3fef3d4e1b29a0873ca338b9e836dda0 100644 --- a/tests/money/test_transfer.py +++ b/tests/money/test_transfer.py @@ -1060,7 +1060,7 @@ def compute_test_amounts(amounts, mult): def construct_args( amounts, amountsud, allsources, recipients, comment, outputbackchange, yes ): - args_list = ["tx"] + args_list = ["transfer"] if yes: args_list.append("--yes") if amounts: diff --git a/tests/money/test_transfer_cli.py b/tests/money/test_transfer_cli.py index 2c95c3f0fceb2f2421d69cd197b7f8f3fdb0d178..33d6b48869c4e27ee7148b481d420c4ab7926175 100644 --- a/tests/money/test_transfer_cli.py +++ b/tests/money/test_transfer_cli.py @@ -122,42 +122,42 @@ def test_transaction_amount_errors( def test_tx_passed_amount_cli(): # One option - result = CliRunner().invoke(cli, ["tx", "--amount", "1"]) + result = CliRunner().invoke(cli, ["transfer", "--amount", "1"]) assert "Error: A recipient should be passed\n" in result.output assert result.exit_code == 1 - result = CliRunner().invoke(cli, ["tx", "--amountUD", "1"]) + result = CliRunner().invoke(cli, ["transfer", "--amountUD", "1"]) assert "Error: A recipient should be passed\n" in result.output assert result.exit_code == 1 - result = CliRunner().invoke(cli, ["tx", "--allSources"]) + result = CliRunner().invoke(cli, ["transfer", "--allSources"]) assert "Error: A recipient should be passed\n" in result.output assert result.exit_code == 1 # Multiple options - result = CliRunner().invoke(cli, ["tx", "--amount", 1, "--amountUD", 1]) + result = CliRunner().invoke(cli, ["transfer", "--amount", 1, "--amountUD", 1]) assert "Error: Usage" in result.output assert result.exit_code == 2 - result = CliRunner().invoke(cli, ["tx", "--amount", 1, "--allSources"]) + result = CliRunner().invoke(cli, ["transfer", "--amount", 1, "--allSources"]) assert "Error: Usage" in result.output assert result.exit_code == 2 - result = CliRunner().invoke(cli, ["tx", "--amountUD", 1, "--allSources"]) + result = CliRunner().invoke(cli, ["transfer", "--amountUD", 1, "--allSources"]) assert "Error: Usage" in result.output assert result.exit_code == 2 result = CliRunner().invoke( - cli, ["tx", "--amount", 1, "--amountUD", 1, "--allSources"] + cli, ["transfer", "--amount", 1, "--amountUD", 1, "--allSources"] ) assert "Error: Usage" in result.output assert result.exit_code == 2 - result = CliRunner().invoke(cli, ["tx", "-r", "A"]) + result = CliRunner().invoke(cli, ["transfer", "-r", "A"]) assert "Error: amount, amountUD or allSources is not set." in result.output assert result.exit_code == FAILURE_EXIT_STATUS - result = CliRunner().invoke(cli, ["tx", "-r", "A", "-r", "B", "--allSources"]) + result = CliRunner().invoke(cli, ["transfer", "-r", "A", "-r", "B", "--allSources"]) assert ( "Error: the --allSources option can only be used with one recipient." in result.output @@ -165,18 +165,18 @@ def test_tx_passed_amount_cli(): assert result.exit_code == FAILURE_EXIT_STATUS result = CliRunner().invoke( - cli, ["tx", "-r", "A", "-a", MINIMAL_ABSOLUTE_TX_AMOUNT - 0.001] + cli, ["transfer", "-r", "A", "-a", MINIMAL_ABSOLUTE_TX_AMOUNT - 0.001] ) assert "Error: Invalid value for '--amount'" in result.output assert result.exit_code == 2 result = CliRunner().invoke( - cli, ["tx", "-r", "A", "-d", MINIMAL_RELATIVE_TX_AMOUNT - 0.0000001] + cli, ["transfer", "-r", "A", "-d", MINIMAL_RELATIVE_TX_AMOUNT - 0.0000001] ) assert "Error: Invalid value for '--amountUD'" in result.output assert result.exit_code == 2 - result = CliRunner().invoke(cli, ["tx", "-r", "A", "-a", 1, "-a", 2]) + result = CliRunner().invoke(cli, ["transfer", "-r", "A", "-a", 1, "-a", 2]) assert ( "Error: The number of passed recipients is not the same as the passed amounts." in result.output @@ -184,7 +184,7 @@ def test_tx_passed_amount_cli(): assert result.exit_code == FAILURE_EXIT_STATUS result = CliRunner().invoke( - cli, ["tx", "-r", "A", "-r", "B", "-r", "C", "-a", 1, "-a", 2] + cli, ["transfer", "-r", "A", "-r", "B", "-r", "C", "-a", 1, "-a", 2] ) assert ( "Error: The number of passed recipients is not the same as the passed amounts." @@ -197,12 +197,12 @@ def test_tx_passed_amount_cli(): "arguments, auth_method, is_account_filled", [ ( - ["tx", "--allSources", "-r", "A" * PUBKEY_MIN_LENGTH], + ["transfer", "--allSources", "-r", "A" * PUBKEY_MIN_LENGTH], patched_auth_method_truc, False, ), ( - ["tx", "--allSources", "-r", "A" * PUBKEY_MIN_LENGTH], + ["transfer", "--allSources", "-r", "A" * PUBKEY_MIN_LENGTH], patched_auth_method_riri, True, ),