mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-13 02:58:57 +00:00
chore(python): improve recovery type deprecation warning
This commit is contained in:
parent
d1625ab4a8
commit
834f1b4473
@ -175,6 +175,7 @@ def recover(
|
||||
warnings.warn(
|
||||
"Use type=RecoveryType.DryRun instead!",
|
||||
DeprecationWarning,
|
||||
stacklevel=3,
|
||||
)
|
||||
|
||||
if type is not None:
|
||||
|
@ -94,7 +94,10 @@ def test_invalid_seed_core(client: Client):
|
||||
IF = InputFlowBip39RecoveryDryRunInvalid(client)
|
||||
client.set_input_flow(IF.get())
|
||||
with pytest.raises(exceptions.Cancelled):
|
||||
return device.recover(client, dry_run=True)
|
||||
return device.recover(
|
||||
client,
|
||||
type=messages.RecoveryType.DryRun,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.setup_client(uninitialized=True)
|
||||
|
@ -50,7 +50,7 @@ def test_2of3_dryrun(client: Client):
|
||||
passphrase_protection=False,
|
||||
pin_protection=False,
|
||||
label="label",
|
||||
dry_run=True,
|
||||
type=messages.RecoveryType.DryRun,
|
||||
)
|
||||
|
||||
# Dry run was successful
|
||||
@ -74,5 +74,5 @@ def test_2of3_invalid_seed_dryrun(client: Client):
|
||||
passphrase_protection=False,
|
||||
pin_protection=False,
|
||||
label="label",
|
||||
dry_run=True,
|
||||
type=messages.RecoveryType.DryRun,
|
||||
)
|
||||
|
@ -46,7 +46,7 @@ def test_2of3_dryrun(client: Client):
|
||||
passphrase_protection=False,
|
||||
pin_protection=False,
|
||||
label="label",
|
||||
dry_run=True,
|
||||
type=messages.RecoveryType.DryRun,
|
||||
)
|
||||
|
||||
# Dry run was successful
|
||||
@ -70,5 +70,5 @@ def test_2of3_invalid_seed_dryrun(client: Client):
|
||||
passphrase_protection=False,
|
||||
pin_protection=False,
|
||||
label="label",
|
||||
dry_run=True,
|
||||
type=messages.RecoveryType.DryRun,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user