diff --git a/tests/application/test_reward.py b/tests/application/test_reward.py index 1dc1b3703..c77192558 100644 --- a/tests/application/test_reward.py +++ b/tests/application/test_reward.py @@ -393,8 +393,8 @@ def test_withdraw(accounts, token, threshold_staking, taco_application, child_ap assert token.balanceOf(beneficiary) == earned assert token.balanceOf(taco_application.address) == reward_portion - earned - events = taco_application.RewardPaid.from_receipt(tx) - assert events == [ + reward_paid_events = taco_application.RewardPaid.from_receipt(tx) + assert reward_paid_events == [ taco_application.RewardPaid( stakingProvider=staking_provider, beneficiary=beneficiary, @@ -402,6 +402,10 @@ def test_withdraw(accounts, token, threshold_staking, taco_application, child_ap sender=beneficiary, ) ] + rewards_withdrawn_events = taco_application.RewardsWithdrawn.from_receipt(tx) + assert rewards_withdrawn_events == [ + taco_application.RewardsWithdrawn(stakingProvider=staking_provider, amount=earned) + ] # Add one more staking provider, push reward again and drop operator chain.pending_timestamp += min_operator_seconds @@ -430,8 +434,8 @@ def test_withdraw(accounts, token, threshold_staking, taco_application, child_ap assert token.balanceOf(beneficiary) == earned + new_earned assert token.balanceOf(taco_application.address) == 2 * reward_portion - earned - new_earned - events = taco_application.RewardPaid.from_receipt(tx) - assert events == [ + reward_paid_events = taco_application.RewardPaid.from_receipt(tx) + assert reward_paid_events == [ taco_application.RewardPaid( stakingProvider=staking_provider, beneficiary=beneficiary, @@ -439,6 +443,10 @@ def test_withdraw(accounts, token, threshold_staking, taco_application, child_ap sender=reward_contract, ) ] + rewards_withdrawn_events = taco_application.RewardsWithdrawn.from_receipt(tx) + assert rewards_withdrawn_events == [ + taco_application.RewardsWithdrawn(stakingProvider=staking_provider, amount=new_earned) + ] # Reset reward contract taco_application.setRewardContract(ZERO_ADDRESS, sender=creator)