mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-04-19 16:49:02 +00:00
fixup! test: update device tests
This commit is contained in:
parent
bc2c5f6ccb
commit
a870bdda05
@ -17,6 +17,7 @@
|
||||
import pytest
|
||||
|
||||
from trezorlib import device, messages
|
||||
from trezorlib.transport.session import SessionV1
|
||||
from trezorlib.debuglink import SessionDebugWrapper as Session
|
||||
from trezorlib.tools import parse_path
|
||||
|
||||
@ -25,7 +26,7 @@ from ...common import MNEMONIC12
|
||||
PIN4 = "1234"
|
||||
PIN6 = "789456"
|
||||
|
||||
pytestmark = pytest.mark.models("legacy")
|
||||
pytestmark = [pytest.mark.models("legacy"), pytest.mark.uninitialized_session]
|
||||
|
||||
|
||||
@pytest.mark.setup_client(uninitialized=True)
|
||||
@ -78,7 +79,7 @@ def test_pin_passphrase(session: Session):
|
||||
assert mnemonic == [None] * 12
|
||||
|
||||
# Mnemonic is the same
|
||||
session.init_session()
|
||||
session = SessionV1.new(session.client)
|
||||
session.client.refresh_features()
|
||||
assert debug.state().mnemonic_secret == MNEMONIC12.encode()
|
||||
|
||||
@ -132,7 +133,7 @@ def test_nopin_nopassphrase(session: Session):
|
||||
assert mnemonic == [None] * 12
|
||||
|
||||
# Mnemonic is the same
|
||||
session.init_session()
|
||||
session = SessionV1.new(session.client)
|
||||
session.client.refresh_features()
|
||||
assert debug.state().mnemonic_secret == MNEMONIC12.encode()
|
||||
|
||||
|
@ -20,6 +20,7 @@ from trezorlib import device, exceptions, messages
|
||||
from trezorlib.client import MAX_PIN_LENGTH
|
||||
from trezorlib.debuglink import SessionDebugWrapper as Session
|
||||
from trezorlib.tools import parse_path
|
||||
from trezorlib.transport.session import SessionV1
|
||||
|
||||
PinType = messages.PinMatrixRequestType
|
||||
|
||||
@ -199,6 +200,6 @@ def test_set_wipe_code_invalid(session: Session, invalid_wipe_code: str):
|
||||
assert isinstance(ret, messages.Failure)
|
||||
|
||||
# Check that there's still no wipe code protection.
|
||||
session.resume()
|
||||
session = Session(SessionV1.new(session.client))
|
||||
session.ensure_unlocked()
|
||||
assert session.features.wipe_code_protection is False
|
||||
|
Loading…
Reference in New Issue
Block a user