diff --git a/python/src/trezorlib/device.py b/python/src/trezorlib/device.py index 95b5db2654..799168d618 100644 --- a/python/src/trezorlib/device.py +++ b/python/src/trezorlib/device.py @@ -175,6 +175,7 @@ def recover( warnings.warn( "Use type=RecoveryType.DryRun instead!", DeprecationWarning, + stacklevel=3, ) if type is not None: diff --git a/tests/device_tests/reset_recovery/test_recovery_bip39_dryrun.py b/tests/device_tests/reset_recovery/test_recovery_bip39_dryrun.py index b46d9dd9ae..416fef78ea 100644 --- a/tests/device_tests/reset_recovery/test_recovery_bip39_dryrun.py +++ b/tests/device_tests/reset_recovery/test_recovery_bip39_dryrun.py @@ -92,7 +92,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) diff --git a/tests/device_tests/reset_recovery/test_recovery_slip39_advanced_dryrun.py b/tests/device_tests/reset_recovery/test_recovery_slip39_advanced_dryrun.py index 3579dc0155..73e18a8686 100644 --- a/tests/device_tests/reset_recovery/test_recovery_slip39_advanced_dryrun.py +++ b/tests/device_tests/reset_recovery/test_recovery_slip39_advanced_dryrun.py @@ -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, ) diff --git a/tests/device_tests/reset_recovery/test_recovery_slip39_basic_dryrun.py b/tests/device_tests/reset_recovery/test_recovery_slip39_basic_dryrun.py index 82992c5317..4c9ddf8036 100644 --- a/tests/device_tests/reset_recovery/test_recovery_slip39_basic_dryrun.py +++ b/tests/device_tests/reset_recovery/test_recovery_slip39_basic_dryrun.py @@ -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, )