Skip to content

Commit

Permalink
test: fix legacy test_firmware_upgrades device tests
Browse files Browse the repository at this point in the history
[no changelog]
  • Loading branch information
M1nd3r committed Nov 27, 2024
1 parent 46ba583 commit c595ecc
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/upgrade_tests/test_firmware_upgrades.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ def asserts(client: "Client") -> None:
assert client.features.initialized
assert client.features.label == LABEL
client.use_pin_sequence([PIN])
assert btc.get_address(client, "Bitcoin", PATH) == ADDRESS
assert btc.get_address(client.get_session(), "Bitcoin", PATH) == ADDRESS

with EmulatorWrapper(gen, tags[0]) as emu:
debuglink.load_device_by_mnemonic(
emu.client,
emu.client.get_management_session(),
mnemonic=MNEMONIC,
pin=PIN,
passphrase_protection=False,
Expand Down Expand Up @@ -171,10 +171,7 @@ def asserts(client: "Client"):
assert client.features.initialized
assert client.features.label == LABEL
client.use_pin_sequence([PIN])
assert (
btc.get_address(client.get_session(passphrase=""), "Bitcoin", PATH)
== ADDRESS
)
assert btc.get_address(client.get_session(), "Bitcoin", PATH) == ADDRESS

with EmulatorWrapper(gen, tag) as emu:
debuglink.load_device_by_mnemonic(
Expand Down Expand Up @@ -205,7 +202,7 @@ def asserts(client: "Client"):
exceptions.TrezorFailure,
match="The new PIN must be different from your wipe code",
):
return device.change_pin(emu.client)
return device.change_pin(session)


@for_all("legacy")
Expand Down

0 comments on commit c595ecc

Please sign in to comment.