mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-21 20:12:02 +00:00
WIP - fail frozen tests
This commit is contained in:
parent
b4c283230e
commit
98d372a088
@ -1119,6 +1119,10 @@ async def confirm_coinjoin(
|
||||
)
|
||||
|
||||
|
||||
def show_coinjoin() -> None:
|
||||
log.error(__name__, "show_coinjoin not implemented")
|
||||
|
||||
|
||||
# TODO cleanup @ redesign
|
||||
async def confirm_sign_identity(
|
||||
ctx: wire.GenericContext, proto: str, identity: str, challenge_visual: str | None
|
||||
|
@ -285,7 +285,7 @@ MESSAGE_LENGTHS = (
|
||||
def test_signmessage_pagination(client: Client, message: str):
|
||||
message_read = ""
|
||||
|
||||
def input_flow_model_t():
|
||||
def input_flow_tt():
|
||||
# collect screen contents into `message_read`.
|
||||
# Join lines that are separated by a single "-" string, space-separate lines otherwise.
|
||||
nonlocal message_read
|
||||
@ -317,7 +317,7 @@ def test_signmessage_pagination(client: Client, message: str):
|
||||
|
||||
client.debug.press_yes()
|
||||
|
||||
def input_flow_model_r():
|
||||
def input_flow_tr():
|
||||
# confirm address
|
||||
yield
|
||||
client.debug.press_yes()
|
||||
@ -331,9 +331,9 @@ def test_signmessage_pagination(client: Client, message: str):
|
||||
|
||||
with client:
|
||||
if client.features.model == "T":
|
||||
client.set_input_flow(input_flow_model_t)
|
||||
client.set_input_flow(input_flow_tt)
|
||||
elif client.features.model == "R":
|
||||
client.set_input_flow(input_flow_model_r)
|
||||
client.set_input_flow(input_flow_tr)
|
||||
client.debug.watch_layout(True)
|
||||
btc.sign_message(
|
||||
client,
|
||||
|
@ -92,6 +92,7 @@ def do_recover_core(client: Client, mnemonic: List[str], **kwargs: Any):
|
||||
|
||||
def do_recover_r(client: Client, mnemonic: List[str], **kwargs: Any):
|
||||
def input_flow():
|
||||
pytest.fail("Freezes")
|
||||
yield
|
||||
layout = client.debug.wait_layout()
|
||||
assert "check the recovery seed" in layout.text
|
||||
@ -105,7 +106,7 @@ def do_recover_r(client: Client, mnemonic: List[str], **kwargs: Any):
|
||||
yield
|
||||
yield
|
||||
layout = client.debug.wait_layout()
|
||||
assert "Number of words?" in layout.text
|
||||
assert "NUMBER OF WORDS" in layout.text
|
||||
word_options = (12, 18, 20, 24, 33)
|
||||
index = word_options.index(len(mnemonic))
|
||||
for _ in range(index):
|
||||
@ -121,7 +122,7 @@ def do_recover_r(client: Client, mnemonic: List[str], **kwargs: Any):
|
||||
yield
|
||||
for word in mnemonic:
|
||||
layout = client.debug.wait_layout()
|
||||
assert "Choose word" in layout.text
|
||||
assert "WORD" in layout.text
|
||||
client.debug.input(word)
|
||||
yield
|
||||
|
||||
@ -227,7 +228,7 @@ def test_invalid_seed_core(client: Client):
|
||||
yield
|
||||
yield
|
||||
layout = client.debug.wait_layout()
|
||||
assert "Number of words?" in layout.text
|
||||
assert "NUMBER OF WORDS" in layout.text
|
||||
# select 12 words
|
||||
client.debug.press_middle()
|
||||
|
||||
@ -240,7 +241,7 @@ def test_invalid_seed_core(client: Client):
|
||||
for _ in range(12):
|
||||
yield
|
||||
layout = client.debug.wait_layout()
|
||||
assert "Choose word" in layout.text
|
||||
assert "WORD" in layout.text
|
||||
client.debug.input("stick")
|
||||
|
||||
br = yield
|
||||
|
@ -82,7 +82,7 @@ def test_tt_pin_passphrase(client: Client):
|
||||
|
||||
yield
|
||||
yield
|
||||
assert "Number of words?" in layout().text
|
||||
assert "NUMBER OF WORDS" in layout().text
|
||||
client.debug.input(str(len(mnemonic)))
|
||||
|
||||
yield
|
||||
@ -92,7 +92,7 @@ def test_tt_pin_passphrase(client: Client):
|
||||
yield
|
||||
for word in mnemonic:
|
||||
yield
|
||||
assert "Choose word" in layout().text
|
||||
assert "WORD" in layout().text
|
||||
client.debug.input(word)
|
||||
|
||||
yield
|
||||
@ -163,7 +163,7 @@ def test_tt_nopin_nopassphrase(client: Client):
|
||||
|
||||
yield
|
||||
yield
|
||||
assert "Number of words?" in layout().text
|
||||
assert "NUMBER OF WORDS" in layout().text
|
||||
client.debug.input(str(len(mnemonic)))
|
||||
|
||||
yield
|
||||
@ -173,7 +173,7 @@ def test_tt_nopin_nopassphrase(client: Client):
|
||||
yield
|
||||
for word in mnemonic:
|
||||
yield
|
||||
assert "Choose word" in layout().text
|
||||
assert "WORD" in layout().text
|
||||
client.debug.input(word)
|
||||
|
||||
yield
|
||||
|
@ -200,6 +200,7 @@ VECTORS = [
|
||||
@pytest.mark.parametrize("backup_type, backup_flow", VECTORS)
|
||||
@pytest.mark.setup_client(uninitialized=True)
|
||||
def test_skip_backup_msg(client: Client, backup_type, backup_flow):
|
||||
pytest.fail("Freezes")
|
||||
os_urandom = mock.Mock(return_value=EXTERNAL_ENTROPY)
|
||||
with mock.patch("os.urandom", os_urandom), client:
|
||||
device.reset(
|
||||
@ -235,6 +236,8 @@ def test_skip_backup_msg(client: Client, backup_type, backup_flow):
|
||||
@pytest.mark.parametrize("backup_type, backup_flow", VECTORS)
|
||||
@pytest.mark.setup_client(uninitialized=True)
|
||||
def test_skip_backup_manual(client: Client, backup_type, backup_flow):
|
||||
pytest.fail("Freezes")
|
||||
|
||||
def reset_skip_input_flow():
|
||||
yield # Confirm Recovery
|
||||
client.debug.press_yes()
|
||||
|
@ -118,16 +118,19 @@ def reset_device(client: Client, strength):
|
||||
|
||||
@pytest.mark.setup_client(uninitialized=True)
|
||||
def test_reset_device(client: Client):
|
||||
pytest.fail("Freezes")
|
||||
reset_device(client, 128) # 12 words
|
||||
|
||||
|
||||
@pytest.mark.setup_client(uninitialized=True)
|
||||
def test_reset_device_192(client: Client):
|
||||
pytest.fail("Freezes")
|
||||
reset_device(client, 192) # 18 words
|
||||
|
||||
|
||||
@pytest.mark.setup_client(uninitialized=True)
|
||||
def test_reset_device_pin(client: Client):
|
||||
pytest.fail("Freezes")
|
||||
mnemonic = None
|
||||
strength = 256 # 24 words
|
||||
|
||||
@ -231,6 +234,7 @@ def test_reset_device_pin(client: Client):
|
||||
|
||||
@pytest.mark.setup_client(uninitialized=True)
|
||||
def test_reset_failed_check(client: Client):
|
||||
pytest.fail("Freezes")
|
||||
mnemonic = None
|
||||
strength = 256 # 24 words
|
||||
|
||||
|
@ -35,6 +35,7 @@ from ...common import (
|
||||
@pytest.mark.skip_t1
|
||||
@pytest.mark.setup_client(uninitialized=True)
|
||||
def test_reset_recovery(client: Client):
|
||||
pytest.fail("Freezes")
|
||||
mnemonic = reset(client)
|
||||
address_before = btc.get_address(client, "Bitcoin", parse_path("m/44h/0h/0h/0/0"))
|
||||
|
||||
|
@ -42,6 +42,7 @@ def click_info_button(debug):
|
||||
@pytest.mark.skip_t1 # TODO we want this for t1 too
|
||||
@pytest.mark.setup_client(needs_backup=True, mnemonic=MNEMONIC12)
|
||||
def test_backup_bip39(client: Client):
|
||||
pytest.fail("Freezes")
|
||||
assert client.features.needs_backup is True
|
||||
mnemonic = None
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user