1
0
fin-depo/test/test_data.py
Jon Michael Aanes 7a5ebae6ff
All checks were successful
Test Python / Test (push) Successful in 27s
Code quality
2024-07-19 01:25:14 +02:00

18 lines
464 B
Python

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