1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-12 01:18:14 +00:00

test(python): fix text_basic device test

[no changelog]
This commit is contained in:
M1nd3r 2024-11-25 14:24:56 +01:00
parent d7e157096a
commit 1575a6f489

View File

@ -19,12 +19,19 @@ from trezorlib.debuglink import SessionDebugWrapper as Session
from trezorlib.debuglink import TrezorClientDebugLink as Client from trezorlib.debuglink import TrezorClientDebugLink as Client
def test_features(session: Session): def test_features(client: Client):
raise Exception("TEST NEEDS TO BE REMADE") session = client.get_session()
f0 = session.features f0 = session.features
if Session(session).session_version == Session.CODEC_V1:
# session erases session_id from its features # session erases session_id from its features
f0.session_id = session.session_id f0.session_id = session.id
f1 = session.call(messages.Initialize(session_id=f0.session_id)) f1 = session.call(messages.Initialize(session_id=session.id))
assert f0 == f1
else:
session2 = client.resume_session(session)
f1: messages.Features = session2.call(messages.GetFeatures())
assert f1.session_id is None
assert f0 == f1 assert f0 == f1