mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-01 20:08:26 +00:00
test(python): fix text_basic device test
[no changelog]
This commit is contained in:
parent
412e339ea7
commit
3d2ada191b
@ -19,13 +19,20 @@ 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
|
||||||
# session erases session_id from its features
|
if Session(session).session_version == Session.CODEC_V1:
|
||||||
f0.session_id = session.session_id
|
# session erases session_id from its features
|
||||||
f1 = session.call(messages.Initialize(session_id=f0.session_id))
|
f0.session_id = session.id
|
||||||
assert f0 == f1
|
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
|
||||||
|
|
||||||
|
|
||||||
def test_capabilities(session: Session):
|
def test_capabilities(session: Session):
|
||||||
|
Loading…
Reference in New Issue
Block a user