diff --git a/trezorlib/tests/device_tests/common.py b/trezorlib/tests/device_tests/common.py index 0d351481a9..18dbb7d3e7 100644 --- a/trezorlib/tests/device_tests/common.py +++ b/trezorlib/tests/device_tests/common.py @@ -56,6 +56,9 @@ class TrezorTest: label="test", language="english", ) + if conftest.TREZOR_VERSION == 1: + # remove cached PIN (introduced via load_device) + self.client.clear_session() if conftest.TREZOR_VERSION > 1 and passphrase: device.apply_settings(self.client, passphrase_source=PASSPHRASE_ON_HOST) diff --git a/trezorlib/tests/device_tests/test_msg_changepin.py b/trezorlib/tests/device_tests/test_msg_changepin.py index d9a27e326a..5590f5e249 100644 --- a/trezorlib/tests/device_tests/test_msg_changepin.py +++ b/trezorlib/tests/device_tests/test_msg_changepin.py @@ -56,9 +56,6 @@ class TestMsgChangepin(TrezorTest): # Check that there's PIN protection now features = self.client.call_raw(proto.Initialize()) assert features.pin_protection is True - ret = self.client.call_raw(proto.Ping(pin_protection=True)) - assert isinstance(ret, proto.PinMatrixRequest) - self.client.call_raw(proto.Cancel()) # Check that the PIN is correct assert self.client.debug.read_pin()[0] == self.pin6 @@ -105,9 +102,6 @@ class TestMsgChangepin(TrezorTest): # Check that there's still PIN protection now features = self.client.call_raw(proto.Initialize()) assert features.pin_protection is True - ret = self.client.call_raw(proto.Ping(pin_protection=True)) - assert isinstance(ret, proto.PinMatrixRequest) - self.client.call_raw(proto.Cancel()) # Check that the PIN is correct assert self.client.debug.read_pin()[0] == self.pin6 diff --git a/trezorlib/tests/device_tests/test_msg_recoverydevice.py b/trezorlib/tests/device_tests/test_msg_recoverydevice.py index e1e7ff5ed9..c52a806248 100644 --- a/trezorlib/tests/device_tests/test_msg_recoverydevice.py +++ b/trezorlib/tests/device_tests/test_msg_recoverydevice.py @@ -85,11 +85,6 @@ class TestMsgRecoverydevice(TrezorTest): assert isinstance(resp, proto.PassphraseRequest) self.client.call_raw(proto.Cancel()) - # Do PIN-protected action, PinRequest should be raised - resp = self.client.call_raw(proto.Ping(pin_protection=True)) - assert isinstance(resp, proto.PinMatrixRequest) - self.client.call_raw(proto.Cancel()) - def test_nopin_nopassphrase(self): mnemonic = self.mnemonic12.split(" ") ret = self.client.call_raw( diff --git a/trezorlib/tests/device_tests/test_msg_resetdevice.py b/trezorlib/tests/device_tests/test_msg_resetdevice.py index 2174333271..8b57837ac5 100644 --- a/trezorlib/tests/device_tests/test_msg_resetdevice.py +++ b/trezorlib/tests/device_tests/test_msg_resetdevice.py @@ -176,11 +176,6 @@ class TestMsgResetDevice(TrezorTest): assert isinstance(resp, proto.PassphraseRequest) self.client.call_raw(proto.Cancel()) - # Do PIN-protected action, PinRequest should be raised - resp = self.client.call_raw(proto.Ping(pin_protection=True)) - assert isinstance(resp, proto.PinMatrixRequest) - self.client.call_raw(proto.Cancel()) - def test_failed_pin(self): # external_entropy = b'zlutoucky kun upel divoke ody' * 2 strength = 128