tests: drop usages of read_passphrase_protection

pull/388/head
matejcik 5 years ago committed by matejcik
parent 22bd94d9ea
commit 0b628252ad

@ -50,7 +50,7 @@ SLIP39_MNEMONIC = [
@setup_client(mnemonic=SLIP39_MNEMONIC, passphrase=True)
def test_cardano_get_address(client, path, expected_address):
# enter passphrase
assert client.debug.read_passphrase_protection() is True
assert client.features.passphrase_protection is True
client.set_passphrase("TREZOR")
address = get_address(client, parse_path(path))

@ -56,7 +56,7 @@ SLIP39_MNEMONIC = [
)
def test_cardano_get_public_key(client, path, public_key, chain_code):
# enter passphrase
assert client.debug.read_passphrase_protection() is True
assert client.features.passphrase_protection is True
client.set_passphrase("TREZOR")
key = get_public_key(client, parse_path(path))

@ -17,8 +17,7 @@
import pytest
from trezorlib import btc, device
from trezorlib.messages.PassphraseSourceType import HOST as PASSPHRASE_ON_HOST
from trezorlib import btc
from .conftest import setup_client
@ -38,9 +37,7 @@ def test_3of6_passphrase(client):
provided by Andrew, address calculated using T1
xprv9s21ZrQH143K2pMWi8jrTawHaj16uKk4CSbvo4Zt61tcrmuUDMx2o1Byzcr3saXNGNvHP8zZgXVdJHsXVdzYFPavxvCyaGyGr1WkAYG83ce
"""
assert client.debug.read_passphrase_protection() is True
device.apply_settings(client, passphrase_source=PASSPHRASE_ON_HOST)
assert client.features.passphrase_protection is True
client.set_passphrase("TREZOR")
address = btc.get_address(client, "Bitcoin", [])
assert address == "18oZEMRWurCZW1FeK8sWYyXuWx2bFqEKyX"
@ -60,9 +57,7 @@ def test_2of5_passphrase(client):
provided by Andrew, address calculated using T1
xprv9s21ZrQH143K2o6EXEHpVy8TCYoMmkBnDCCESLdR2ieKwmcNG48ck2XJQY4waS7RUQcXqR9N7HnQbUVEDMWYyREdF1idQqxFHuCfK7fqFni
"""
assert client.debug.read_passphrase_protection() is True
device.apply_settings(client, passphrase_source=PASSPHRASE_ON_HOST)
assert client.features.passphrase_protection is True
client.set_passphrase("TREZOR")
address = btc.get_address(client, "Bitcoin", [])
assert address == "19Fjs9AvT13Y2Nx8GtoVfADmFWnccsPinQ"

Loading…
Cancel
Save