Test partisia blockchain
This commit is contained in:
parent
ef417c6175
commit
e993acf3af
|
@ -166,7 +166,7 @@ class PartisiaBlockchainAccountDepoFetcher(DepoFetcher):
|
||||||
{fin_defs.MPC: balances.mpc},
|
{fin_defs.MPC: balances.mpc},
|
||||||
)
|
)
|
||||||
depo_byoc = DepoSingle(
|
depo_byoc = DepoSingle(
|
||||||
'BYOC',
|
'Bring Your Own Coin',
|
||||||
balances.update_time,
|
balances.update_time,
|
||||||
{BYOC_ASSETS[k]: v for k, v in balances.byoc.items()},
|
{BYOC_ASSETS[k]: v for k, v in balances.byoc.items()},
|
||||||
)
|
)
|
||||||
|
|
|
@ -14,11 +14,11 @@ needs_secrets = pytest.mark.skipif(
|
||||||
@needs_secrets
|
@needs_secrets
|
||||||
def test_get_depo():
|
def test_get_depo():
|
||||||
session = requests.Session()
|
session = requests.Session()
|
||||||
nordnet = investbank_nordnet.NordnetDepoFetcher(
|
fetcher = investbank_nordnet.NordnetDepoFetcher(
|
||||||
session,
|
session,
|
||||||
secrets.NORDNET_USERNAME,
|
secrets.NORDNET_USERNAME,
|
||||||
secrets.NORDNET_PASSWORD,
|
secrets.NORDNET_PASSWORD,
|
||||||
)
|
)
|
||||||
|
|
||||||
depo = nordnet.get_depo()
|
depo = fetcher.get_depo()
|
||||||
assert depo is not None
|
assert depo is not None
|
||||||
|
|
23
test/test_partisia_blockchain.py
Normal file
23
test/test_partisia_blockchain.py
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
import fin_defs
|
||||||
|
import requests
|
||||||
|
|
||||||
|
from fin_depo import defi_partisia_blockchain
|
||||||
|
|
||||||
|
|
||||||
|
def test_get_depo():
|
||||||
|
session = requests.Session()
|
||||||
|
fetcher = defi_partisia_blockchain.PartisiaBlockchainAccountDepoFetcher(
|
||||||
|
session,
|
||||||
|
'00f3a778fbcf663e4f0d47b41aa4ec51e0f9d39d60',
|
||||||
|
)
|
||||||
|
|
||||||
|
depo = fetcher.get_depo()
|
||||||
|
assert depo is not None
|
||||||
|
assert depo.name == 'Partisia Blockchain'
|
||||||
|
assert depo.updated_time is not None
|
||||||
|
assert depo.nested[0].name == 'Native'
|
||||||
|
assert depo.nested[0].updated_time == depo.updated_time
|
||||||
|
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)
|
Loading…
Reference in New Issue
Block a user