Skip to content
Snippets Groups Projects
Commit 47de72cf authored by matograine's avatar matograine
Browse files

[test] #362 add an error case in test_tx_passed_amount_cli

  * --amountUD in inferior to 1e-6
parent ae9b3b99
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,7 @@ from silkaj.money import UDValue
from silkaj.cli import cli
from silkaj.constants import (
MINIMAL_ABSOLUTE_TX_AMOUNT,
MINIMAL_RELATIVE_TX_AMOUNT,
FAILURE_EXIT_STATUS,
CENT_MULT_TO_UNIT,
)
......@@ -169,6 +170,12 @@ def test_tx_passed_amount_cli():
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]
)
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])
assert (
"Error: The number of passed recipients is not the same as the passed amounts."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment