mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-08-02 11:58:32 +00:00
fixup! test(python): adjust tests to session-based trezorlib
This commit is contained in:
parent
5cc7d4c7c7
commit
1dde0e0cdf
@ -58,6 +58,19 @@ def get_ping_title(lang: str) -> str:
|
|||||||
return content["translations"]["words__confirm"]
|
return content["translations"]["words__confirm"]
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def client(client: Client) -> Iterator[Client]:
|
||||||
|
session = client.get_seedless_session()
|
||||||
|
lang_before = session.features.language or ""
|
||||||
|
try:
|
||||||
|
set_language(session, "en", force=True)
|
||||||
|
yield client
|
||||||
|
finally:
|
||||||
|
client = client.get_new_client()
|
||||||
|
session = client.get_seedless_session()
|
||||||
|
set_language(session, lang_before[:2], force=True)
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def session(session: Session) -> Iterator[Session]:
|
def session(session: Session) -> Iterator[Session]:
|
||||||
lang_before = session.features.language or ""
|
lang_before = session.features.language or ""
|
||||||
|
Loading…
Reference in New Issue
Block a user