1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-15 19:08:07 +00:00

test(core): fix T3T1 U2F test

[no changelog]
This commit is contained in:
Martin Milata 2024-10-17 15:47:50 +02:00 committed by matejcik
parent ea815eba93
commit 87a01a9bfb

View File

@ -24,17 +24,9 @@ async def confirm_fido(
# debuglink will directly inject a CONFIRMED message which we need to handle
# by playing back a click to the Rust layout and getting out the selected number
# that way
from trezor import io
msg = confirm.touch_event(io.TOUCH_START, 220, 220)
assert msg is None
if confirm.paint():
ui.refresh()
msg = confirm.touch_event(io.TOUCH_END, 220, 220)
if confirm.paint():
ui.refresh()
assert isinstance(msg, int)
return msg
# Or we can just return 0 because this only happens in U2F tests
# which don't use multiple credentials.
return 0
# The Rust side returns either an int or `CANCELLED`. We detect the int situation
# and assume cancellation otherwise.