Skip to content

Commit cea56fd

Browse files
committed
Fix vault test with revault, checking also the revaulted instance
1 parent 4b8a17a commit cea56fd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/test_vault.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import Tuple
22
import pytest
33

4-
from examples.vault.vault_contracts import Vault
4+
from examples.vault.vault_contracts import Vault, Unvaulting
55

66
from matt.btctools import key
77
from matt.btctools.auth_proxy import AuthServiceProxy, JSONRPCException
@@ -183,7 +183,12 @@ def test_vault_trigger_with_revault_and_withdraw(vault_specs: VaultSpecs, rpc: A
183183
{**args, "sig": sigs[i]}
184184
))
185185

186-
[U_inst] = manager.spend_and_wait([V_inst_1, V_inst_2, V_inst_3], spend_tx)
186+
[U_inst, V_revault_inst] = manager.spend_and_wait([V_inst_1, V_inst_2, V_inst_3], spend_tx)
187+
188+
assert isinstance(U_inst.contract, Unvaulting)
189+
assert isinstance(V_revault_inst.contract, Vault)
190+
assert manager.instances.index(U_inst) >= 0
191+
assert manager.instances.index(V_revault_inst) >= 0
187192

188193
report.write(vault_description, format_tx_markdown(spend_tx, "Trigger (with revault) [3 vault inputs]"))
189194

0 commit comments

Comments
 (0)