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