1
0
fin-depo/test/test_data.py

18 lines
464 B
Python
Raw Permalink Normal View History

2024-07-18 23:24:59 +00:00
import datetime
from decimal import Decimal
import fin_defs
from fin_depo.data import DepoGroup, DepoSingle
def test_duplicate_assets():
now = datetime.datetime.now(tz=datetime.UTC)
single1 = DepoSingle('test1', now, {fin_defs.DKK: Decimal(1000)})
single2 = DepoSingle('test2', now, {fin_defs.DKK: Decimal(1000)})
group = DepoGroup('test3', now, [single1, single2])
assert len(group.nested) == 2
assert len(list(group.assets())) == 1