Skip to content

Commit

Permalink
test: use fish
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlagonia committed Sep 22, 2023
1 parent 637d0b4 commit 1ecd029
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions tests/unit/vault/test_buy_debt.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ def set_role(vault, gov):


def test_buy_debt__strategy_not_active__reverts(
gov, asset, vault, mint_and_deposit_into_vault, fish_amount, create_strategy
gov, asset, vault, mint_and_deposit_into_vault, fish, fish_amount, create_strategy
):
amount = fish_amount

strategy = create_strategy(vault)

mint_and_deposit_into_vault(vault)
mint_and_deposit_into_vault(vault, fish, amount)

# Approve vault to pull funds.
asset.mint(gov.address, amount, sender=gov)
Expand All @@ -34,15 +34,15 @@ def test_buy_debt__strategy_not_active__reverts(


def test_buy_debt__no_debt__reverts(
gov, asset, vault, mint_and_deposit_into_vault, fish_amount, create_strategy
gov, asset, vault, mint_and_deposit_into_vault, fish_amount, create_strategy, fish
):
amount = fish_amount

strategy = create_strategy(vault)

vault.add_strategy(strategy.address, sender=gov)

mint_and_deposit_into_vault(vault)
mint_and_deposit_into_vault(vault, fish, amount)

# Approve vault to pull funds.
asset.mint(gov.address, amount, sender=gov)
Expand All @@ -60,10 +60,11 @@ def test_buy_debt__no_amount__reverts(
fish_amount,
strategy,
add_debt_to_strategy,
fish,
):
amount = fish_amount

mint_and_deposit_into_vault(vault, gov, amount)
mint_and_deposit_into_vault(vault, fish, amount)

add_debt_to_strategy(gov, strategy, vault, amount)

Expand All @@ -83,10 +84,11 @@ def test_buy_debt__more_than_available__withdraws_current_debt(
fish_amount,
strategy,
add_debt_to_strategy,
fish,
):
amount = fish_amount

mint_and_deposit_into_vault(vault, gov, amount)
mint_and_deposit_into_vault(vault, fish, amount)

add_debt_to_strategy(gov, strategy, vault, amount)

Expand Down Expand Up @@ -128,10 +130,11 @@ def test_buy_debt__full_debt(
fish_amount,
strategy,
add_debt_to_strategy,
fish,
):
amount = fish_amount

mint_and_deposit_into_vault(vault, gov, amount)
mint_and_deposit_into_vault(vault, fish, amount)

add_debt_to_strategy(gov, strategy, vault, amount)

Expand Down Expand Up @@ -173,10 +176,11 @@ def test_buy_debt__half_debt(
fish_amount,
strategy,
add_debt_to_strategy,
fish,
):
amount = fish_amount

mint_and_deposit_into_vault(vault, gov, amount)
mint_and_deposit_into_vault(vault, fish, amount)

add_debt_to_strategy(gov, strategy, vault, amount)

Expand Down

0 comments on commit 1ecd029

Please sign in to comment.