Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
silkaj
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
matograine
silkaj
Commits
ee4d2688
Commit
ee4d2688
authored
May 12, 2019
by
Moul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[test] #22: add tx_history test
parent
1133be7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
tests/test_tx_history.py
tests/test_tx_history.py
+30
-0
No files found.
tests/test_tx_history.py
0 → 100644
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment