diff options
Diffstat (limited to 'tests/managers/thl/test_payout.py')
| -rw-r--r-- | tests/managers/thl/test_payout.py | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/tests/managers/thl/test_payout.py b/tests/managers/thl/test_payout.py index a9cd52a..be121d8 100644 --- a/tests/managers/thl/test_payout.py +++ b/tests/managers/thl/test_payout.py @@ -388,7 +388,7 @@ class TestBusinessPayoutEventManager: ledger_collection.initial_load(client=None, sync=True) pop_ledger_merge.build(client=client_no_amm, ledger_coll=ledger_collection) gr_business.prebuild_balance( - thl_pg_config=thl_web_rr, + product_manager=product_manager, lm=thl_ledger_manager, ds=mnt_filepath, client=client_no_amm, @@ -472,6 +472,7 @@ class TestBusinessPayoutEventManager: self, business_payout_event_manager: BusinessPayoutEventManager, request ): # TODO: Generate this file at random + # @max file is not commited fp = os.path.join( request.config.rootpath, "data/pytest_recoup_proportional.csv" ) @@ -690,7 +691,7 @@ class TestBusinessPayoutEventManager: ledger_collection.initial_load(client=None, sync=True) pop_ledger_merge.build(client=client_no_amm, ledger_coll=ledger_collection) gr_business.prebuild_balance( - thl_pg_config=thl_web_rr, + product_manager=product_manager, lm=ledger_manager, ds=mnt_filepath, client=client_no_amm, @@ -862,18 +863,18 @@ class TestBusinessPayoutEventManager: assert gr_business.payouts is None gr_business.prebuild_payouts( - thl_pg_config=thl_web_rr, - thl_lm=thl_ledger_manager, bpem=business_payout_event_manager, ) assert isinstance(gr_business.payouts, list) assert len(gr_business.payouts) == 1 assert gr_business.payouts[0].ext_ref_id == ach_id1 + ach_id2 = uuid4().hex + bp1 = business_payout_event_manager.create_from_ach_or_wire( business=gr_business, amount=USDCent(bb1.available_balance), - transaction_id=ach_id1, + transaction_id=ach_id2, pm=product_manager, thl_lm=thl_ledger_manager, created=start + timedelta(days=1, hours=5), @@ -885,16 +886,12 @@ class TestBusinessPayoutEventManager: bp1_tx = brokerage_product_payout_event_manager.check_for_ledger_tx( thl_ledger_manager=thl_ledger_manager, payout_event=bp1.bp_payouts[0], - product_id=bp1.bp_payouts[0].product_id, - amount=bp1.bp_payouts[0].amount, ) assert bp1_tx bp2_tx = brokerage_product_payout_event_manager.check_for_ledger_tx( thl_ledger_manager=thl_ledger_manager, payout_event=bp1.bp_payouts[1], - product_id=bp1.bp_payouts[1].product_id, - amount=bp1.bp_payouts[1].amount, ) assert bp2_tx @@ -996,13 +993,12 @@ class TestBusinessPayoutEventManager: wall_req_cpi=Decimal("50.00"), started=start + timedelta(days=1, hours=2, minutes=1 + idx), ) - payout_event_manager.set_account_lookup_table(thl_lm=thl_ledger_manager) # Now that we paid out the business: Business, let's confirm the updated balances ledger_collection.initial_load(client=None, sync=True) pop_ledger_merge.build(client=client_no_amm, ledger_coll=ledger_collection) gr_business.prebuild_balance( - thl_pg_config=thl_web_rr, + product_manager=product_manager, lm=ledger_manager, ds=mnt_filepath, client=client_no_amm, @@ -1042,6 +1038,7 @@ class TestBusinessPayoutEventManager: pm=product_manager, thl_lm=thl_ledger_manager, created=start + timedelta(days=1, hours=3), + transaction_id=uuid4().hex, ) assert isinstance(bp1, BusinessPayoutEvent) assert len(bp1.bp_payouts) == 3 @@ -1057,7 +1054,7 @@ class TestBusinessPayoutEventManager: # balance.available_balance are reflective of having a $250 ACH/Wire # sent to the Business gr_business.prebuild_balance( - thl_pg_config=thl_web_rr, + product_manager=product_manager, lm=ledger_manager, ds=mnt_filepath, client=client_no_amm, @@ -1123,14 +1120,13 @@ class TestBusinessPayoutEventManager: wall_req_cpi=Decimal("7.50"), started=start + timedelta(days=1, hours=1 + iidx, minutes=1 + idx), ) - payout_event_manager.set_account_lookup_table(thl_lm=thl_ledger_manager) rm_ledger_collection() rm_pop_ledger_merge() ledger_collection.initial_load(client=None, sync=True) pop_ledger_merge.build(client=client_no_amm, ledger_coll=ledger_collection) gr_business.prebuild_balance( - thl_pg_config=thl_web_rr, + product_manager=product_manager, lm=ledger_manager, ds=mnt_filepath, client=client_no_amm, @@ -1151,7 +1147,7 @@ class TestBusinessPayoutEventManager: ledger_collection.initial_load(client=None, sync=True) pop_ledger_merge.build(client=client_no_amm, ledger_coll=ledger_collection) gr_business.prebuild_balance( - thl_pg_config=thl_web_rr, + product_manager=product_manager, lm=ledger_manager, ds=mnt_filepath, client=client_no_amm, @@ -1175,12 +1171,10 @@ class TestBusinessPayoutEventManager: ledger_collection.initial_load(client=None, sync=True) pop_ledger_merge.build(client=client_no_amm, ledger_coll=ledger_collection) gr_business.prebuild_payouts( - thl_pg_config=thl_web_rr, - thl_lm=thl_ledger_manager, bpem=business_payout_event_manager, ) gr_business.prebuild_balance( - thl_pg_config=thl_web_rr, + product_manager=product_manager, lm=ledger_manager, ds=mnt_filepath, client=client_no_amm, |
