1
0
fin-depo/test/test_static.py

17 lines
438 B
Python
Raw Normal View History

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