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:
parent
b778385201
commit
74804177ca
@ -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
|
||||
)
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user