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
47de72cf
Commit
47de72cf
authored
4 years ago
by
matograine
Browse files
Options
Downloads
Patches
Plain Diff
[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
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_tx.py
+7
-0
7 additions, 0 deletions
tests/test_tx.py
with
7 additions
and
0 deletions
tests/test_tx.py
+
7
−
0
View file @
47de72cf
...
@@ -23,6 +23,7 @@ from silkaj.money import UDValue
...
@@ -23,6 +23,7 @@ from silkaj.money import UDValue
from
silkaj.cli
import
cli
from
silkaj.cli
import
cli
from
silkaj.constants
import
(
from
silkaj.constants
import
(
MINIMAL_ABSOLUTE_TX_AMOUNT
,
MINIMAL_ABSOLUTE_TX_AMOUNT
,
MINIMAL_RELATIVE_TX_AMOUNT
,
FAILURE_EXIT_STATUS
,
FAILURE_EXIT_STATUS
,
CENT_MULT_TO_UNIT
,
CENT_MULT_TO_UNIT
,
)
)
...
@@ -169,6 +170,12 @@ def test_tx_passed_amount_cli():
...
@@ -169,6 +170,12 @@ def test_tx_passed_amount_cli():
assert
"
Error: Invalid value for
'
--amount
'"
in
result
.
output
assert
"
Error: Invalid value for
'
--amount
'"
in
result
.
output
assert
result
.
exit_code
==
2
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
])
result
=
CliRunner
().
invoke
(
cli
,
[
"
tx
"
,
"
-r
"
,
"
A
"
,
"
-a
"
,
1
,
"
-a
"
,
2
])
assert
(
assert
(
"
Error: The number of passed recipients is not the same as the passed amounts.
"
"
Error: The number of passed recipients is not the same as the passed amounts.
"
...
...
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