1
0
fin-depo/test/test_static.py

20 lines
445 B
Python
Raw Normal View History

2024-07-27 01:14:12 +00:00
from decimal import Decimal
import fin_defs
import fin_depo
2024-07-27 01:14:12 +00:00
def test_get_depo():
fetcher = fin_depo.static.StaticDepoFetcher(
'Test',
{fin_defs.BTC: Decimal(1000), fin_defs.USD: Decimal(2000)},
)
depo = fetcher.get_depo()
# Check layout
assert isinstance(depo, fin_depo.data.DepoSingle)
assert depo.get_amount_of_asset(fin_defs.BTC) == 1000
assert depo.get_amount_of_asset(fin_defs.USD) == 2000