From e5ea96ac77cef7a7c79e3b4c4fcd855ba575992e Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Tue, 19 May 2020 18:00:01 +0200 Subject: [PATCH] [test] Make use of FAILURE_EXIT_STATUS constant --- tests/test_tx.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_tx.py b/tests/test_tx.py index d38ed48d..e633340b 100644 --- a/tests/test_tx.py +++ b/tests/test_tx.py @@ -3,7 +3,7 @@ from click.testing import CliRunner from silkaj.tx import transaction_amount from silkaj.money import UDValue from silkaj.cli import cli -from silkaj.constants import MINIMAL_TX_AMOUNT +from silkaj.constants import MINIMAL_TX_AMOUNT, FAILURE_EXIT_STATUS @pytest.mark.asyncio @@ -66,14 +66,14 @@ def test_tx_passed_amount_cli(): result = CliRunner().invoke(cli, ["tx", "-r", "A"]) assert "Error: amount, amountUD or allSources is not set." in result.output - assert result.exit_code == 1 + assert result.exit_code == FAILURE_EXIT_STATUS result = CliRunner().invoke(cli, ["tx", "-r", "A", "-r", "B", "--allSources"]) assert ( "Error: the --allSources option can only be used with one recipient." in result.output ) - assert result.exit_code == 1 + assert result.exit_code == FAILURE_EXIT_STATUS result = CliRunner().invoke(cli, ["tx", "-r", "A", "-a", MINIMAL_TX_AMOUNT - 0.001]) assert 'Error: Invalid value for "--amount"' in result.output @@ -84,7 +84,7 @@ def test_tx_passed_amount_cli(): "Error: The number of passed recipients is not the same as the passed amounts." in result.output ) - assert result.exit_code == 1 + assert result.exit_code == FAILURE_EXIT_STATUS result = CliRunner().invoke( cli, ["tx", "-r", "A", "-r", "B", "-r", "C", "-a", 1, "-a", 2] @@ -93,4 +93,4 @@ def test_tx_passed_amount_cli(): "Error: The number of passed recipients is not the same as the passed amounts." in result.output ) - assert result.exit_code == 1 + assert result.exit_code == FAILURE_EXIT_STATUS -- GitLab