Skip to content

Commit

Permalink
Fix brownie tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shahthepro committed May 28, 2024
1 parent 987fd45 commit 940a693
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/governance/test_initial_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_counting_mode(governance):


def test_voting_delay(governance):
assert governance.votingDelay() == 1 # 1 block
assert governance.votingDelay() == 7200 # 1 block


def test_voting_period(governance):
Expand Down
16 changes: 8 additions & 8 deletions tests/governance/test_vote.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_create_proposal(governance, staking, token, whale_voter):
"Switch to new Convex implementation",
{"from": whale_voter},
)
chain.mine()
chain.mine(7201)
proposal_quorum = governance.quorum(tx.block_number)
assert approx(proposal_quorum, staking.getPastTotalSupply(tx.block_number) * 0.2)

Expand All @@ -40,7 +40,7 @@ def test_can_cancel_proposal(governance, staking, token, whale_voter):
"Set voting delay",
{"from": whale_voter},
)
chain.mine()
chain.mine(7201)
governance.cancel(tx.return_value, {"from": whale_voter})
assert governance.state(tx.return_value) == 2

Expand All @@ -56,7 +56,7 @@ def test_proposal_can_pass_vote(governance, staking, token, whale_voter, timeloc
"Set voting delay",
{"from": whale_voter},
)
chain.mine()
chain.mine(7201)
proposal_quorum = governance.quorum(tx.block_number)
expected_quorum = staking.getPastTotalSupply(tx.block_number) * 0.2
assert approx(proposal_quorum, expected_quorum)
Expand Down Expand Up @@ -91,7 +91,7 @@ def test_proposal_can_fail_vote(
"Set voting delay",
{"from": accounts[0]},
)
chain.mine()
chain.mine(7201)
proposal_quorum = governance.quorum(tx.block_number)
expected_quorum = staking.getPastTotalSupply(tx.block_number) * 0.2
assert approx(proposal_quorum, expected_quorum)
Expand All @@ -117,7 +117,7 @@ def test_proposal_can_be_queued_and_executed_in_timelock(
"Set voting delay",
{"from": whale_voter},
)
chain.mine()
chain.mine(7201)
governance.castVote(tx.return_value, 1, {"from": whale_voter})
mine_blocks(web3)
governance.queue(tx.return_value, {"from": whale_voter})
Expand Down Expand Up @@ -159,7 +159,7 @@ def test_timelock_proposal_can_be_cancelled(
"Set voting delay",
{"from": whale_voter},
)
chain.mine()
chain.mine(7201)
governance.castVote(tx.return_value, 1, {"from": whale_voter})
mine_blocks(web3)
governance.queue(tx.return_value, {"from": whale_voter})
Expand All @@ -185,7 +185,7 @@ def test_timelock_proposal_can_be_cancelled_after_time_passes(
"Set voting delay",
{"from": whale_voter},
)
chain.mine()
chain.mine(7201)
governance.castVote(tx.return_value, 1, {"from": whale_voter})
mine_blocks(web3)
governance.queue(tx.return_value, {"from": whale_voter})
Expand All @@ -209,7 +209,7 @@ def test_timelock_proposal_can_not_be_cancelled_after_is_executed(
"Set voting delay",
{"from": whale_voter},
)
chain.mine()
chain.mine(7201)
governance.castVote(tx.return_value, 1, {"from": whale_voter})
mine_blocks(web3)
assert governance.state(tx.return_value) == 4
Expand Down

0 comments on commit 940a693

Please sign in to comment.