1
0
fin-depo/test/test_static.py
Jon Michael Aanes 66ad96af16
All checks were successful
Test Python / Test (push) Successful in 26s
Added static and aggregator depo fetchers
2024-07-25 00:52:09 +02:00

17 lines
438 B
Python

import fin_defs
import fin_depo
from decimal import Decimal
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