diff options
| author | Greg Stupp | 2026-09-18 22:39:18 +0000 |
|---|---|---|
| committer | Greg Stupp | 2026-09-18 22:39:18 +0000 |
| commit | b373b992cae3a9628a9cf64387c7b8e286d6e1e0 (patch) | |
| tree | 5e21759ea2c6925e8f54328fbbac88b6be007648 /tests/models/test_finance.py | |
| parent | 32f30b5ddc600e22e071f7659f1872a18ebf42c7 (diff) | |
| parent | e3c6a824f4176402e40217c5ce70f837dedc5c3d (diff) | |
| download | generalresearch-3.5.0.tar.gz generalresearch-3.5.0.zip | |
Merges pull request #4
v3.5.0
User Cashout Stuff pulled out of grpc, user ip history enrichments with grip (no maxmind)
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 |
