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
ee4d2688
Commit
ee4d2688
authored
5 years ago
by
Moul
Browse files
Options
Downloads
Patches
Plain Diff
[test]
#22
: add tx_history test
parent
1133be7b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_tx_history.py
+30
-0
30 additions, 0 deletions
tests/test_tx_history.py
with
30 additions
and
0 deletions
tests/test_tx_history.py
0 → 100644
+
30
−
0
View file @
ee4d2688
import
pytest
from
duniterpy.api.client
import
Client
from
silkaj.tx_history
import
(
get_transactions_history
,
remove_duplicate_txs
,
generate_table
,
)
from
silkaj.constants
import
G1_DEFAULT_ENDPOINT
@pytest.mark.asyncio
async
def
test_tx_history_generate_table
():
client
=
Client
(
"
BMAS
"
+
"
"
.
join
(
G1_DEFAULT_ENDPOINT
))
ud_value
=
10.07
currency
=
"
gtest
"
uids
=
False
table_columns
=
5
pubkey
=
"
78ZwwgpgdH5uLZLbThUQH7LKwPgjMunYfLiCfUCySkM8
"
received_txs
,
sent_txs
=
list
(),
list
()
await
get_transactions_history
(
client
,
pubkey
,
received_txs
,
sent_txs
)
remove_duplicate_txs
(
received_txs
,
sent_txs
)
txs_list
=
await
generate_table
(
received_txs
,
sent_txs
,
pubkey
,
ud_value
,
currency
,
uids
)
await
client
.
close
()
for
tx_list
in
txs_list
:
assert
len
(
tx_list
)
==
table_columns
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