1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-01 20:08:26 +00:00

test: fix obtaining sessions with passphrase and setting language

[no changelog]
This commit is contained in:
M1nd3r 2024-11-27 11:58:37 +01:00
parent b778385201
commit 74804177ca
6 changed files with 6 additions and 4 deletions

View File

@ -1378,7 +1378,7 @@ class TrezorClientDebugLink(TrezorClient):
return send_passphrase(None, None)
try:
if isinstance(session, SessionV1):
if session.passphrase is None and isinstance(session, SessionV1):
passphrase = self.ui.get_passphrase(
available_on_device=available_on_device
)

View File

@ -38,7 +38,7 @@ def test_reset_recovery(client: Client):
lang = client.features.language or "en"
device.wipe(session)
client = client.get_new_client()
session = client.get_management_session()
session = Session(client.get_management_session())
set_language(session, lang[:2])
recover(session, mnemonic)
session = client.get_session()

View File

@ -57,7 +57,7 @@ def test_reset_recovery(client: Client):
lang = client.features.language or "en"
device.wipe(session)
client = client.get_new_client()
session = client.get_management_session()
session = Session(client.get_management_session())
set_language(session, lang[:2])
recover(session, combination)
session = client.get_session()

View File

@ -46,7 +46,7 @@ def test_reset_recovery(client: Client):
lang = client.features.language or "en"
device.wipe(session)
client = client.get_new_client()
session = client.get_management_session()
session = Session(client.get_management_session())
set_language(session, lang[:2])
selected_mnemonics = share_subset
recover(session, selected_mnemonics)

View File

@ -41,6 +41,7 @@ def test_128bit_passphrase(client: Client):
session = client.get_session(passphrase="ROZERT")
address_compare = get_test_address(session)
assert address != address_compare
assert address_compare == "n1HeeeojjHgQnG6Bf5VWkM1gcpQkkXqSGw"
@pytest.mark.setup_client(mnemonic=MNEMONIC_SLIP39_ADVANCED_33, passphrase=True)

View File

@ -159,6 +159,7 @@ def test_session_recycling(client: Client):
]
)
client.use_passphrase("TREZOR")
_ = get_test_address(session)
# address = get_test_address(session)
# create and close 100 sessions - more than the session limit