|
|
|
@ -31,7 +31,7 @@ from ..input_flows import (
|
|
|
|
|
InputFlowBip39Backup,
|
|
|
|
|
InputFlowSlip39AdvancedBackup,
|
|
|
|
|
InputFlowSlip39BasicBackup,
|
|
|
|
|
InputFlowSlip39SingleBackup,
|
|
|
|
|
InputFlowSlip39CustomBackup,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -115,18 +115,15 @@ def test_backup_slip39_advanced(client: Client, click_info: bool):
|
|
|
|
|
@pytest.mark.skip_t1b1
|
|
|
|
|
@pytest.mark.setup_client(needs_backup=True, mnemonic=MNEMONIC_SLIP39_ADVANCED_20)
|
|
|
|
|
@pytest.mark.parametrize(
|
|
|
|
|
"click_info", [True, False], ids=["click_info", "no_click_info"]
|
|
|
|
|
"share_threshold,share_count", [(1, 1), (2, 2), (3, 5)], ids=["1_of_1", "2_of_2", "3_of_5"]
|
|
|
|
|
)
|
|
|
|
|
def test_backup_slip39_single(client: Client, click_info: bool):
|
|
|
|
|
if click_info and client.model is models.T2B1:
|
|
|
|
|
pytest.skip("click_info not implemented on T2B1")
|
|
|
|
|
|
|
|
|
|
def test_backup_slip39_custom(client: Client, share_threshold, share_count):
|
|
|
|
|
assert client.features.needs_backup is True
|
|
|
|
|
|
|
|
|
|
with client:
|
|
|
|
|
IF = InputFlowSlip39SingleBackup(client, click_info)
|
|
|
|
|
IF = InputFlowSlip39CustomBackup(client, share_count)
|
|
|
|
|
client.set_input_flow(IF.get())
|
|
|
|
|
device.backup(client, group_threshold=1, groups=[(1, 1)])
|
|
|
|
|
device.backup(client, group_threshold=1, groups=[(share_threshold, share_count)])
|
|
|
|
|
|
|
|
|
|
client.init_device()
|
|
|
|
|
assert client.features.initialized is True
|
|
|
|
|