Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
silkaj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
python
silkaj
Commits
68c961ac
Commit
68c961ac
authored
5 years ago
by
Moul
Browse files
Options
Downloads
Patches
Plain Diff
[test] Make use of FAILURE_EXIT_STATUS constant
parent
6d3ad026
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_tx.py
+5
-5
5 additions, 5 deletions
tests/test_tx.py
with
5 additions
and
5 deletions
tests/test_tx.py
+
5
−
5
View file @
68c961ac
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment