Skip to content

Commit

Permalink
Fix/fix test (#235)
Browse files Browse the repository at this point in the history
* fix: fix test with hardcoded values

* test: fix chain time inconsistency
  • Loading branch information
albert-llimos authored Sep 20, 2022
1 parent 7285bc4 commit 92c03ed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/token_vesting/revoke/test_revoke_nostaking.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def test_revoke_rev_revoker(a, addrs, cf, tokenVestingNoStaking):


def test_revoke_rev_revokable(addrs, cf, TokenVesting):
start = 1622400000
start = getChainTime()
cliff = start + QUARTER_YEAR
end = start + QUARTER_YEAR + YEAR

Expand Down
2 changes: 1 addition & 1 deletion tests/token_vesting/revoke/test_revoke_staking.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_revoke_rev_revoker(a, addrs, cf, tokenVestingStaking):


def test_revoke_rev_revokable(addrs, cf, TokenVesting):
start = 1622400000
start = getChainTime()
end = start + QUARTER_YEAR + YEAR
cliff = end

Expand Down
2 changes: 2 additions & 0 deletions tests/unit/vault/test_vault_govWithdraw.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def test_govWithdraw(

chain.sleep(st_sleepTime)
if getChainTime() - cf.keyManager.getLastValidateTime() < AGG_KEY_EMERGENCY_TIMEOUT:
# Add a sleep to ensure that it will revert (brownie is inconsistent with chain time)
chain.sleep(3)
with reverts(REV_MSG_VAULT_DELAY):
cf.vault.govWithdraw(tokenList, {"from": cf.GOVERNOR})
else:
Expand Down

0 comments on commit 92c03ed

Please sign in to comment.