mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-04-16 07:15:47 +00:00
fix(python): partially fix shamir persistence tests
This commit is contained in:
parent
5c09501632
commit
0cf404b573
@ -58,6 +58,7 @@ class BackgroundDeviceHandler:
|
||||
def run_with_session(
|
||||
self,
|
||||
function: t.Callable[tx.Concatenate["Session", P], t.Any],
|
||||
seedless: bool = False,
|
||||
*args: P.args,
|
||||
**kwargs: P.kwargs,
|
||||
) -> None:
|
||||
@ -69,7 +70,10 @@ class BackgroundDeviceHandler:
|
||||
raise RuntimeError("Wait for previous task first")
|
||||
|
||||
# wait for the first UI change triggered by the task running in the background
|
||||
session = self.client.get_session()
|
||||
if seedless:
|
||||
session = self.client.get_seedless_session()
|
||||
else:
|
||||
session = self.client.get_session()
|
||||
with self.debuglink().wait_for_layout_change():
|
||||
self.task = self._pool.submit(function, session, *args, **kwargs)
|
||||
|
||||
|
@ -83,7 +83,7 @@ def test_recovery_single_reset(core_emulator: Emulator):
|
||||
assert features.initialized is False
|
||||
assert features.recovery_status == RecoveryStatus.Nothing
|
||||
|
||||
device_handler.run_with_session(device.recover, pin_protection=False)
|
||||
device_handler.run_with_session(device.recover, seedless=True, pin_protection=False)
|
||||
|
||||
recovery.confirm_recovery(debug)
|
||||
|
||||
@ -130,7 +130,7 @@ def test_recovery_on_old_wallet(core_emulator: Emulator):
|
||||
assert features.recovery_status == RecoveryStatus.Nothing
|
||||
|
||||
# enter recovery mode
|
||||
device_handler.run_with_session(device.recover, pin_protection=False)
|
||||
device_handler.run_with_session(device.recover, seedless=True, pin_protection=False)
|
||||
|
||||
recovery.confirm_recovery(debug)
|
||||
|
||||
@ -209,7 +209,7 @@ def test_recovery_multiple_resets(core_emulator: Emulator):
|
||||
assert features.recovery_status == RecoveryStatus.Nothing
|
||||
|
||||
# start device and recovery
|
||||
device_handler.run_with_session(device.recover, pin_protection=False)
|
||||
device_handler.run_with_session(device.recover, seedless=True, pin_protection=False)
|
||||
|
||||
recovery.confirm_recovery(debug)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user