1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-04-19 08:39:03 +00:00

fixup! test: update device tests

This commit is contained in:
M1nd3r 2025-03-24 13:38:51 +01:00
parent a80f070d6d
commit dc66799e6d
3 changed files with 7 additions and 7 deletions

View File

@ -156,7 +156,7 @@ def test_reset_entropy_check(session: Session):
assert IF.mnemonic == expected_mnemonic
# Check that the device is properly initialized.
if session.client.protocol_version is ProtocolVersion.PROTOCOL_V1:
if session.client.protocol_version is ProtocolVersion.V1:
features = session.call_raw(messages.Initialize())
else:
session.refresh_features()

View File

@ -23,7 +23,7 @@ from trezorlib.debuglink import TrezorClientDebugLink as Client
def test_features(client: Client):
session = client.get_session()
f0 = session.features
if client.protocol_version == ProtocolVersion.PROTOCOL_V1:
if client.protocol_version == ProtocolVersion.V1:
# session erases session_id from its features
f0.session_id = session.id
f1 = session.call(messages.Initialize(session_id=session.id))

View File

@ -64,7 +64,7 @@ def _assert_protection(
assert session.client.features.passphrase_protection is passphrase
session.lock()
# session.end()
if session.protocol_version == ProtocolVersion.PROTOCOL_V1:
if session.protocol_version == ProtocolVersion.V1:
new_session = session.client.get_session()
return new_session
@ -191,7 +191,7 @@ def test_get_public_key(session: Session):
session.client.use_pin_sequence([PIN4])
expected_responses = [_pin_request(session)]
if session.protocol_version == ProtocolVersion.PROTOCOL_V1:
if session.protocol_version == ProtocolVersion.V1:
expected_responses.append(messages.PassphraseRequest)
expected_responses.append(messages.PublicKey)
@ -205,7 +205,7 @@ def test_get_address(session: Session):
with session:
session.client.use_pin_sequence([PIN4])
expected_responses = [_pin_request(session)]
if session.protocol_version == ProtocolVersion.PROTOCOL_V1:
if session.protocol_version == ProtocolVersion.V1:
expected_responses.append(messages.PassphraseRequest)
expected_responses.append(messages.Address)
@ -306,7 +306,7 @@ def test_sign_message(session: Session):
expected_responses = [_pin_request(session)]
if session.protocol_version == ProtocolVersion.PROTOCOL_V1:
if session.protocol_version == ProtocolVersion.V1:
expected_responses.append(messages.PassphraseRequest)
expected_responses.extend(
@ -392,7 +392,7 @@ def test_signtx(session: Session):
with session:
session.client.use_pin_sequence([PIN4])
expected_responses = [_pin_request(session)]
if session.protocol_version == ProtocolVersion.PROTOCOL_V1:
if session.protocol_version == ProtocolVersion.V1:
expected_responses.append(messages.PassphraseRequest)
expected_responses.extend(
[