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:
parent
a80f070d6d
commit
dc66799e6d
@ -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()
|
||||
|
@ -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))
|
||||
|
@ -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(
|
||||
[
|
||||
|
Loading…
Reference in New Issue
Block a user