diff --git a/tests/device_tests/test_msg_loaddevice.py b/tests/device_tests/test_msg_loaddevice.py index 42c27efc23..2b9ff923a3 100644 --- a/tests/device_tests/test_msg_loaddevice.py +++ b/tests/device_tests/test_msg_loaddevice.py @@ -17,14 +17,16 @@ import pytest from trezorlib import btc, debuglink, device +from trezorlib.messages.PassphraseSourceType import HOST as PASSPHRASE_ON_HOST from .common import MNEMONIC12, TrezorTest -@pytest.mark.skip_t2 @pytest.mark.setup_client(uninitialized=True) class TestDeviceLoad(TrezorTest): def test_load_device_1(self, client): + if client.features.model == "2": + device.apply_settings(client, passphrase_source=PASSPHRASE_ON_HOST) debuglink.load_device_by_mnemonic( client, mnemonic=MNEMONIC12, @@ -41,6 +43,8 @@ class TestDeviceLoad(TrezorTest): assert address == "1EfKbQupktEMXf4gujJ9kCFo83k1iMqwqK" def test_load_device_2(self, client): + if client.features.model == "2": + device.apply_settings(client, passphrase_source=PASSPHRASE_ON_HOST) debuglink.load_device_by_mnemonic( client, mnemonic=MNEMONIC12, @@ -51,7 +55,10 @@ class TestDeviceLoad(TrezorTest): client.set_passphrase("passphrase") state = client.debug.state() assert state.mnemonic_secret == MNEMONIC12.encode() - assert state.pin == "1234" + + if client.features.model == "1": + # we do not send PIN in DebugLinkState in Core + assert state.pin == "1234" assert state.passphrase_protection is True address = btc.get_address(client, "Bitcoin", []) @@ -77,6 +84,8 @@ class TestDeviceLoad(TrezorTest): ) device.wipe(client) + if client.features.model == "2": + device.apply_settings(client, passphrase_source=PASSPHRASE_ON_HOST) debuglink.load_device_by_mnemonic( client, mnemonic=words_nfkd, @@ -90,6 +99,8 @@ class TestDeviceLoad(TrezorTest): address_nfkd = btc.get_address(client, "Bitcoin", []) device.wipe(client) + if client.features.model == "2": + device.apply_settings(client, passphrase_source=PASSPHRASE_ON_HOST) debuglink.load_device_by_mnemonic( client, mnemonic=words_nfc, @@ -103,6 +114,8 @@ class TestDeviceLoad(TrezorTest): address_nfc = btc.get_address(client, "Bitcoin", []) device.wipe(client) + if client.features.model == "2": + device.apply_settings(client, passphrase_source=PASSPHRASE_ON_HOST) debuglink.load_device_by_mnemonic( client, mnemonic=words_nfkc, @@ -116,6 +129,8 @@ class TestDeviceLoad(TrezorTest): address_nfkc = btc.get_address(client, "Bitcoin", []) device.wipe(client) + if client.features.model == "2": + device.apply_settings(client, passphrase_source=PASSPHRASE_ON_HOST) debuglink.load_device_by_mnemonic( client, mnemonic=words_nfd,