1
0
fin-depo/test/test_partisia_blockchain.py
Jon Michael Aanes 677e2af74c
All checks were successful
Test Python / Test (push) Successful in 27s
Expose data in __init__
2024-07-21 11:15:13 +02:00

30 lines
859 B
Python

import fin_defs
import requests
import fin_depo
def test_get_depo():
session = requests.Session()
fetcher = fin_depo.defi_partisia_blockchain.PartisiaBlockchainAccountDepoFetcher(
session,
'00f3a778fbcf663e4f0d47b41aa4ec51e0f9d39d60',
)
depo = fetcher.get_depo()
# Check layout
assert isinstance(depo, fin_depo.data.DepoGroup)
assert depo.name == 'Partisia Blockchain'
assert depo.updated_time is not None
assert isinstance(depo.nested[0], fin_depo.data.DepoSingle)
assert depo.nested[0].name == 'Native'
assert depo.nested[0].updated_time == depo.updated_time
assert isinstance(depo.nested[0], fin_depo.data.DepoSingle)
assert depo.nested[1].name == 'Bring Your Own Coin'
assert depo.nested[1].updated_time == depo.updated_time
assert depo.get_amount_of_asset(fin_defs.MPC)