1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 06:48:16 +00:00

tests: update komodo test with optional message feature

This commit is contained in:
matejcik 2020-03-27 12:11:35 +01:00 committed by Tomas Susanka
parent 396a509725
commit 4bc0289601

View File

@ -54,22 +54,20 @@ class TestMsgSigntxKomodo:
script_type=proto.OutputScriptType.PAYTOADDRESS,
)
trezor_core = client.features.model != "1"
with client:
er = [
request_input(0),
request_output(0),
proto.ButtonRequest(code=B.ConfirmOutput),
]
if client.features.model != "1": # extra screen for lock_time
er += [proto.ButtonRequest(code=B.SignTx)]
er += [
proto.ButtonRequest(code=B.SignTx),
request_input(0),
request_output(0),
request_finished(),
]
client.set_expected_responses(er)
client.set_expected_responses(
[
request_input(0),
request_output(0),
proto.ButtonRequest(code=B.ConfirmOutput),
(trezor_core, proto.ButtonRequest(code=B.SignTx)),
proto.ButtonRequest(code=B.SignTx),
request_input(0),
request_output(0),
request_finished(),
]
)
details = proto.SignTx(
version=4,
@ -112,24 +110,23 @@ class TestMsgSigntxKomodo:
script_type=proto.OutputScriptType.PAYTOADDRESS,
)
trezor_core = client.features.model != "1"
with client:
er = [
request_input(0),
request_output(0),
proto.ButtonRequest(code=B.ConfirmOutput),
request_output(1),
proto.ButtonRequest(code=B.ConfirmOutput),
]
if client.features.model != "1": # extra screen for lock_time
er += [proto.ButtonRequest(code=B.SignTx)]
er += [
proto.ButtonRequest(code=B.SignTx),
request_input(0),
request_output(0),
request_output(1),
request_finished(),
]
client.set_expected_responses(er)
client.set_expected_responses(
[
request_input(0),
request_output(0),
proto.ButtonRequest(code=B.ConfirmOutput),
request_output(1),
proto.ButtonRequest(code=B.ConfirmOutput),
(trezor_core, proto.ButtonRequest(code=B.SignTx)),
proto.ButtonRequest(code=B.SignTx),
request_input(0),
request_output(0),
request_output(1),
request_finished(),
]
)
details = proto.SignTx(
version=4,