1
0
fin-depo/test/test_static.py
Jon Michael Aanes bcae3d4e29
Some checks failed
Test Python / Test (push) Failing after 26s
Ruff
2024-07-27 03:14:12 +02:00

19 lines
437 B
Python

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