aboutsummaryrefslogtreecommitdiff
path: root/tests/models
diff options
context:
space:
mode:
authorstuppie2026-10-14 12:58:19 -0700
committerstuppie2026-10-14 12:58:19 -0700
commit71869ce1fe23c5a2e9d7d2760f60f9beaba331ab (patch)
treea706fb7237f1b1b40b5c664215b5a8a61baf64dc /tests/models
parent015e9cec610611c305f6ec3693dd80ca8dd6a81d (diff)
downloadgeneralresearch-3.8.4.tar.gz
generalresearch-3.8.4.zip
add BusinessPayoutEvent.line_item_countv3.8.4
Diffstat (limited to 'tests/models')
-rw-r--r--tests/models/thl/test_payout.py41
1 files changed, 20 insertions, 21 deletions
diff --git a/tests/models/thl/test_payout.py b/tests/models/thl/test_payout.py
index cc00f33..5b00e01 100644
--- a/tests/models/thl/test_payout.py
+++ b/tests/models/thl/test_payout.py
@@ -14,13 +14,12 @@ from generalresearch.models.gr.business import (
from generalresearch.models.gr.definitions import BusinessType
from generalresearch.models.thl.payout import (
BrokerageProductPayoutEvent,
- BusinessPayoutEvent,
+ BusinessPayoutEventCreate,
)
from generalresearch.models.thl.wallet.definitions import PayoutType
class TestBusinessPayoutEvent:
-
def test_validate(self):
# Doesn't validate anymore
@@ -51,30 +50,30 @@ class TestBusinessPayoutEvent:
assert isinstance(b, Business)
ext_ref_id = uuid4().hex
- bpe = BusinessPayoutEvent(
+ bpe = BusinessPayoutEventCreate(
business_id=uuid4().hex,
amount=USDCent(100_00),
payout_type=PayoutType.ACH,
ext_ref_id=ext_ref_id,
+ bp_payouts=[
+ BrokerageProductPayoutEvent(
+ product_id=uuid4().hex,
+ payout_type=PayoutType.ACH,
+ amount=USDCent(47_00),
+ cashout_method_uuid=uuid4().hex,
+ debit_account_uuid=uuid4().hex,
+ ext_ref_id=ext_ref_id,
+ ),
+ BrokerageProductPayoutEvent(
+ product_id=uuid4().hex,
+ payout_type=PayoutType.ACH,
+ amount=USDCent(53_00),
+ cashout_method_uuid=uuid4().hex,
+ debit_account_uuid=uuid4().hex,
+ ext_ref_id=ext_ref_id,
+ ),
+ ],
)
- bpe.bp_payouts = [
- BrokerageProductPayoutEvent(
- product_id=uuid4().hex,
- payout_type=PayoutType.ACH,
- amount=USDCent(47_00),
- cashout_method_uuid=uuid4().hex,
- debit_account_uuid=uuid4().hex,
- ext_ref_id=ext_ref_id,
- ),
- BrokerageProductPayoutEvent(
- product_id=uuid4().hex,
- payout_type=PayoutType.ACH,
- amount=USDCent(53_00),
- cashout_method_uuid=uuid4().hex,
- debit_account_uuid=uuid4().hex,
- ext_ref_id=ext_ref_id,
- ),
- ]
# Test validations (amount sum)
with pytest.raises(