diff --git a/tests/device_tests/reset_recovery/test_recovery_bip39_t1.py b/tests/device_tests/reset_recovery/test_recovery_bip39_t1.py index 1798bba390..c5aa1da76d 100644 --- a/tests/device_tests/reset_recovery/test_recovery_bip39_t1.py +++ b/tests/device_tests/reset_recovery/test_recovery_bip39_t1.py @@ -18,6 +18,7 @@ import pytest from trezorlib import device, messages from trezorlib.debuglink import TrezorClientDebugLink as Client +from trezorlib.tools import parse_path from ...common import MNEMONIC12 @@ -84,7 +85,7 @@ def test_pin_passphrase(client: Client): assert client.features.passphrase_protection is True # Do passphrase-protected action, PassphraseRequest should be raised - resp = client.call_raw(messages.GetAddress()) + resp = client.call_raw(messages.GetAddress(address_n=parse_path("m/44'/0'/0'/0/0"))) assert isinstance(resp, messages.PassphraseRequest) client.call_raw(messages.Cancel()) @@ -135,7 +136,7 @@ def test_nopin_nopassphrase(client: Client): assert client.features.passphrase_protection is False # Do pin & passphrase-protected action, PassphraseRequest should NOT be raised - resp = client.call_raw(messages.GetAddress()) + resp = client.call_raw(messages.GetAddress(address_n=parse_path("m/44'/0'/0'/0/0"))) assert isinstance(resp, messages.Address) diff --git a/tests/device_tests/reset_recovery/test_reset_bip39_t1.py b/tests/device_tests/reset_recovery/test_reset_bip39_t1.py index 95269f2ff1..929c0f5da6 100644 --- a/tests/device_tests/reset_recovery/test_reset_bip39_t1.py +++ b/tests/device_tests/reset_recovery/test_reset_bip39_t1.py @@ -19,6 +19,7 @@ from mnemonic import Mnemonic from trezorlib import device, messages from trezorlib.debuglink import TrezorClientDebugLink as Client +from trezorlib.tools import parse_path from ...common import generate_entropy @@ -87,7 +88,7 @@ def reset_device(client: Client, strength): assert resp.passphrase_protection is False # Do pin & passphrase-protected action, PassphraseRequest should NOT be raised - resp = client.call_raw(messages.GetAddress()) + resp = client.call_raw(messages.GetAddress(address_n=parse_path("m/44'/0'/0'/0/0"))) assert isinstance(resp, messages.Address) @@ -186,7 +187,7 @@ def test_reset_device_256_pin(client: Client): assert resp.passphrase_protection is True # Do passphrase-protected action, PassphraseRequest should be raised - resp = client.call_raw(messages.GetAddress()) + resp = client.call_raw(messages.GetAddress(address_n=parse_path("m/44'/0'/0'/0/0"))) assert isinstance(resp, messages.PassphraseRequest) client.call_raw(messages.Cancel()) diff --git a/tests/device_tests/test_bip32_speed.py b/tests/device_tests/test_bip32_speed.py index f6c9376f07..6043e0be60 100644 --- a/tests/device_tests/test_bip32_speed.py +++ b/tests/device_tests/test_bip32_speed.py @@ -18,8 +18,9 @@ import time import pytest -from trezorlib import btc +from trezorlib import btc, device from trezorlib.debuglink import TrezorClientDebugLink as Client +from trezorlib.messages import SafetyCheckLevel from trezorlib.tools import H_ pytestmark = [ @@ -29,6 +30,8 @@ pytestmark = [ def test_public_ckd(client: Client): + # disable safety checks to access non-standard paths + device.apply_settings(client, safety_checks=SafetyCheckLevel.PromptTemporarily) btc.get_address(client, "Bitcoin", []) # to compute root node via BIP39 for depth in range(8): @@ -41,6 +44,8 @@ def test_public_ckd(client: Client): def test_private_ckd(client: Client): + # disable safety checks to access non-standard paths + device.apply_settings(client, safety_checks=SafetyCheckLevel.PromptTemporarily) btc.get_address(client, "Bitcoin", []) # to compute root node via BIP39 for depth in range(8): @@ -54,6 +59,9 @@ def test_private_ckd(client: Client): def test_cache(client: Client): + # disable safety checks to access non-standard paths + device.apply_settings(client, safety_checks=SafetyCheckLevel.PromptTemporarily) + start = time.time() for x in range(10): btc.get_address(client, "Bitcoin", [x, 2, 3, 4, 5, 6, 7, 8]) diff --git a/tests/device_tests/test_debuglink.py b/tests/device_tests/test_debuglink.py index bb1824eb73..d8ee68d7a5 100644 --- a/tests/device_tests/test_debuglink.py +++ b/tests/device_tests/test_debuglink.py @@ -18,6 +18,7 @@ import pytest from trezorlib import debuglink, device, messages, misc from trezorlib.debuglink import TrezorClientDebugLink as Client +from trezorlib.tools import parse_path from trezorlib.transport import udp from ..common import MNEMONIC12 @@ -40,7 +41,7 @@ def test_mnemonic(client: Client): @pytest.mark.skip_t2 @pytest.mark.setup_client(mnemonic=MNEMONIC12, pin="1234", passphrase="") def test_pin(client: Client): - resp = client.call_raw(messages.GetAddress()) + resp = client.call_raw(messages.GetAddress(address_n=parse_path("m/44'/0'/0'/0/0"))) assert isinstance(resp, messages.PinMatrixRequest) state = client.debug.state() diff --git a/tests/device_tests/test_msg_change_wipe_code_t1.py b/tests/device_tests/test_msg_change_wipe_code_t1.py index 4d6b0a6c45..45e7ba1671 100644 --- a/tests/device_tests/test_msg_change_wipe_code_t1.py +++ b/tests/device_tests/test_msg_change_wipe_code_t1.py @@ -19,6 +19,7 @@ import pytest from trezorlib import device, exceptions, messages from trezorlib.client import MAX_PIN_LENGTH from trezorlib.debuglink import TrezorClientDebugLink as Client +from trezorlib.tools import parse_path PinType = messages.PinMatrixRequestType @@ -177,7 +178,7 @@ def test_set_pin_to_wipe_code(client: Client): # Check that there is no PIN protection. client.init_device() assert client.features.pin_protection is False - resp = client.call_raw(messages.GetAddress()) + resp = client.call_raw(messages.GetAddress(address_n=parse_path("m/44'/0'/0'/0/0"))) assert isinstance(resp, messages.Address)