mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-04 13:38:28 +00:00
fix(python): fix test_autolock
[no changelog]
This commit is contained in:
parent
9e9814acf5
commit
017d234634
@ -145,7 +145,7 @@ def test_autolock_cancels_ui(session: Session):
|
|||||||
|
|
||||||
def test_autolock_ignores_initialize(session: Session):
|
def test_autolock_ignores_initialize(session: Session):
|
||||||
session.lock()
|
session.lock()
|
||||||
|
client = session.client
|
||||||
set_autolock_delay(session, 10 * 1000)
|
set_autolock_delay(session, 10 * 1000)
|
||||||
|
|
||||||
assert session.features.unlocked is True
|
assert session.features.unlocked is True
|
||||||
@ -153,11 +153,11 @@ def test_autolock_ignores_initialize(session: Session):
|
|||||||
start = time.monotonic()
|
start = time.monotonic()
|
||||||
while time.monotonic() - start < 11:
|
while time.monotonic() - start < 11:
|
||||||
# init_device should always work even if locked
|
# init_device should always work even if locked
|
||||||
raise Exception("THIS SHOULD BE REMADE")
|
client.resume_session(session)
|
||||||
session.init_device()
|
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
|
|
||||||
# after 11 seconds we are definitely locked
|
# after 11 seconds we are definitely locked
|
||||||
|
session.refresh_features()
|
||||||
assert session.features.unlocked is False
|
assert session.features.unlocked is False
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user