mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-22 05:10:56 +00:00
chore(python): improve recovery type deprecation warning
This commit is contained in:
parent
84292a66b4
commit
38395c16ce
@ -175,6 +175,7 @@ def recover(
|
|||||||
warnings.warn(
|
warnings.warn(
|
||||||
"Use type=RecoveryType.DryRun instead!",
|
"Use type=RecoveryType.DryRun instead!",
|
||||||
DeprecationWarning,
|
DeprecationWarning,
|
||||||
|
stacklevel=3,
|
||||||
)
|
)
|
||||||
|
|
||||||
if type is not None:
|
if type is not None:
|
||||||
|
@ -92,7 +92,10 @@ def test_invalid_seed_core(client: Client):
|
|||||||
IF = InputFlowBip39RecoveryDryRunInvalid(client)
|
IF = InputFlowBip39RecoveryDryRunInvalid(client)
|
||||||
client.set_input_flow(IF.get())
|
client.set_input_flow(IF.get())
|
||||||
with pytest.raises(exceptions.Cancelled):
|
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)
|
@pytest.mark.setup_client(uninitialized=True)
|
||||||
|
@ -50,7 +50,7 @@ def test_2of3_dryrun(client: Client):
|
|||||||
passphrase_protection=False,
|
passphrase_protection=False,
|
||||||
pin_protection=False,
|
pin_protection=False,
|
||||||
label="label",
|
label="label",
|
||||||
dry_run=True,
|
type=messages.RecoveryType.DryRun,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Dry run was successful
|
# Dry run was successful
|
||||||
@ -74,5 +74,5 @@ def test_2of3_invalid_seed_dryrun(client: Client):
|
|||||||
passphrase_protection=False,
|
passphrase_protection=False,
|
||||||
pin_protection=False,
|
pin_protection=False,
|
||||||
label="label",
|
label="label",
|
||||||
dry_run=True,
|
type=messages.RecoveryType.DryRun,
|
||||||
)
|
)
|
||||||
|
@ -46,7 +46,7 @@ def test_2of3_dryrun(client: Client):
|
|||||||
passphrase_protection=False,
|
passphrase_protection=False,
|
||||||
pin_protection=False,
|
pin_protection=False,
|
||||||
label="label",
|
label="label",
|
||||||
dry_run=True,
|
type=messages.RecoveryType.DryRun,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Dry run was successful
|
# Dry run was successful
|
||||||
@ -70,5 +70,5 @@ def test_2of3_invalid_seed_dryrun(client: Client):
|
|||||||
passphrase_protection=False,
|
passphrase_protection=False,
|
||||||
pin_protection=False,
|
pin_protection=False,
|
||||||
label="label",
|
label="label",
|
||||||
dry_run=True,
|
type=messages.RecoveryType.DryRun,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user