diff options
| author | stuppie | 2026-09-18 15:15:55 -0600 |
|---|---|---|
| committer | stuppie | 2026-09-18 15:15:55 -0600 |
| commit | 83e587c8f5431d9370429f623709092a60e006fd (patch) | |
| tree | 64ce18340c06f33f0074e904272cd717f948bda7 /tests/models/test_finance.py | |
| parent | f4909f0fafd6161dd423859afadb72b916e90564 (diff) | |
| download | generalresearch-83e587c8f5431d9370429f623709092a60e006fd.tar.gz generalresearch-83e587c8f5431d9370429f623709092a60e006fd.zip | |
fix some more tests
Diffstat (limited to 'tests/models/test_finance.py')
| -rw-r--r-- | tests/models/test_finance.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/models/test_finance.py b/tests/models/test_finance.py index a1da961..53df014 100644 --- a/tests/models/test_finance.py +++ b/tests/models/test_finance.py @@ -2,6 +2,7 @@ from __future__ import annotations from collections.abc import Callable from datetime import UTC, datetime, timedelta +from decimal import Decimal from itertools import product as iter_product from random import randint from typing import TYPE_CHECKING @@ -839,16 +840,22 @@ class TestBusinessBalanceData: delete_df_collection(coll=ledger_collection) rm_ledger_collection() + # We're expecting 5 time periods x 5 $.50 complete (minus 5% commission = $0.48) + # = $12.00 for _ in range(5): u: User = user_factory(product=product, created=ledger_collection.start) for item in ledger_collection.items: + # A time may be randomly outside the date range, as the + # session_with_tx_factory adds time to each wall event it creates item_time = fake.date_time_between( start_date=item.start, - end_date=item.finish, + end_date=item.finish - timedelta(minutes=10), tzinfo=UTC, ) - session_with_tx_factory(started=item_time, user=u) + session_with_tx_factory( + started=item_time, user=u, wall_req_cpi=Decimal("0.50") + ) item.initial_load(overwrite=True) # Confirm any of the items are archived |
