From 71869ce1fe23c5a2e9d7d2760f60f9beaba331ab Mon Sep 17 00:00:00 2001 From: stuppie Date: Wed, 14 Oct 2026 12:58:19 -0700 Subject: add BusinessPayoutEvent.line_item_count --- tests/models/thl/test_payout.py | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) (limited to 'tests/models') 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( -- cgit v1.2.3