|
|
|
@ -67,3 +67,27 @@ def test_cancel_message_via_initialize(client, message):
|
|
|
|
|
resp = client._raw_read()
|
|
|
|
|
|
|
|
|
|
assert isinstance(resp, m.Features)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.skip_t1
|
|
|
|
|
def test_cancel_on_paginated(client):
|
|
|
|
|
"""Check that device is responsive on paginated screen. See #1708."""
|
|
|
|
|
# In #1708, the device would ignore USB (or UDP) events while waiting for the user
|
|
|
|
|
# to page through the screen. This means that this testcase, instead of failing,
|
|
|
|
|
# would get stuck waiting for the _raw_read result.
|
|
|
|
|
# I'm not spending the effort to modify the testcase to cause a _failure_ if that
|
|
|
|
|
# happens again. Just be advised that this should not get stuck.
|
|
|
|
|
message = m.SignMessage(
|
|
|
|
|
message=b"hello" * 64,
|
|
|
|
|
address_n=TEST_ADDRESS_N,
|
|
|
|
|
coin_name="Testnet",
|
|
|
|
|
)
|
|
|
|
|
resp = client.call_raw(message)
|
|
|
|
|
assert isinstance(resp, m.ButtonRequest)
|
|
|
|
|
assert resp.pages is not None
|
|
|
|
|
client._raw_write(m.ButtonAck())
|
|
|
|
|
|
|
|
|
|
client._raw_write(m.Cancel())
|
|
|
|
|
resp = client._raw_read()
|
|
|
|
|
assert isinstance(resp, m.Failure)
|
|
|
|
|
assert resp.code == m.FailureType.ActionCancelled
|
|
|
|
|