mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-29 17:48:10 +00:00
chore(tests): more test reorganizations
This commit is contained in:
parent
18a2642d95
commit
0b0a77703c
@ -20,8 +20,8 @@ from trezorlib import btc, device, messages
|
|||||||
from trezorlib.exceptions import TrezorFailure
|
from trezorlib.exceptions import TrezorFailure
|
||||||
from trezorlib.tools import parse_path
|
from trezorlib.tools import parse_path
|
||||||
|
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
from .signtx import request_finished, request_input, request_meta, request_output
|
from ..signtx import request_finished, request_input, request_meta, request_output
|
||||||
|
|
||||||
B = messages.ButtonRequestType
|
B = messages.ButtonRequestType
|
||||||
|
|
@ -20,8 +20,8 @@ from trezorlib import btc, messages
|
|||||||
from trezorlib.exceptions import TrezorFailure
|
from trezorlib.exceptions import TrezorFailure
|
||||||
from trezorlib.tools import H_, parse_path
|
from trezorlib.tools import H_, parse_path
|
||||||
|
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
from .signtx import request_finished, request_input, request_meta, request_output
|
from ..signtx import request_finished, request_input, request_meta, request_output
|
||||||
|
|
||||||
B = messages.ButtonRequestType
|
B = messages.ButtonRequestType
|
||||||
TX_API = TxCache("Bcash")
|
TX_API = TxCache("Bcash")
|
@ -20,8 +20,8 @@ from trezorlib import btc, messages
|
|||||||
from trezorlib.exceptions import TrezorFailure
|
from trezorlib.exceptions import TrezorFailure
|
||||||
from trezorlib.tools import H_, btc_hash, parse_path
|
from trezorlib.tools import H_, btc_hash, parse_path
|
||||||
|
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
from .signtx import request_finished, request_input, request_meta, request_output
|
from ..signtx import request_finished, request_input, request_meta, request_output
|
||||||
|
|
||||||
B = messages.ButtonRequestType
|
B = messages.ButtonRequestType
|
||||||
TX_API = TxCache("Bgold")
|
TX_API = TxCache("Bgold")
|
@ -19,8 +19,8 @@ import pytest
|
|||||||
from trezorlib import btc, messages
|
from trezorlib import btc, messages
|
||||||
from trezorlib.tools import parse_path
|
from trezorlib.tools import parse_path
|
||||||
|
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
from .signtx import (
|
from ..signtx import (
|
||||||
request_extra_data,
|
request_extra_data,
|
||||||
request_finished,
|
request_finished,
|
||||||
request_input,
|
request_input,
|
@ -19,8 +19,8 @@ import pytest
|
|||||||
from trezorlib import btc, messages
|
from trezorlib import btc, messages
|
||||||
from trezorlib.tools import parse_path
|
from trezorlib.tools import parse_path
|
||||||
|
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
from .signtx import request_finished, request_input, request_meta, request_output
|
from ..signtx import request_finished, request_input, request_meta, request_output
|
||||||
|
|
||||||
B = messages.ButtonRequestType
|
B = messages.ButtonRequestType
|
||||||
TX_API = TxCache("Decred Testnet")
|
TX_API = TxCache("Decred Testnet")
|
@ -19,7 +19,7 @@ import pytest
|
|||||||
from trezorlib import btc, messages
|
from trezorlib import btc, messages
|
||||||
from trezorlib.tools import btc_hash, parse_path
|
from trezorlib.tools import btc_hash, parse_path
|
||||||
|
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
|
|
||||||
TX_API = TxCache("Firo Testnet")
|
TX_API = TxCache("Firo Testnet")
|
||||||
TXHASH_8a34cc = bytes.fromhex(
|
TXHASH_8a34cc = bytes.fromhex(
|
@ -21,7 +21,7 @@ from trezorlib.exceptions import TrezorFailure
|
|||||||
from trezorlib.messages import SafetyCheckLevel
|
from trezorlib.messages import SafetyCheckLevel
|
||||||
from trezorlib.tools import parse_path
|
from trezorlib.tools import parse_path
|
||||||
|
|
||||||
from .. import bip32
|
from ... import bip32
|
||||||
|
|
||||||
|
|
||||||
def getmultisig(chain, nr, xpubs):
|
def getmultisig(chain, nr, xpubs):
|
@ -48,25 +48,25 @@ VECTORS = ( # coin, path, script_type, address
|
|||||||
(
|
(
|
||||||
"Testnet",
|
"Testnet",
|
||||||
"86'/1'/0'/0/0",
|
"86'/1'/0'/0/0",
|
||||||
proto.InputScriptType.SPENDTAPROOT,
|
messages.InputScriptType.SPENDTAPROOT,
|
||||||
"tb1pswrqtykue8r89t9u4rprjs0gt4qzkdfuursfnvqaa3f2yql07zmq8s8a5u",
|
"tb1pswrqtykue8r89t9u4rprjs0gt4qzkdfuursfnvqaa3f2yql07zmq8s8a5u",
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"Testnet",
|
"Testnet",
|
||||||
"86'/1'/0'/1/0",
|
"86'/1'/0'/1/0",
|
||||||
proto.InputScriptType.SPENDTAPROOT,
|
messages.InputScriptType.SPENDTAPROOT,
|
||||||
"tb1pn2d0yjeedavnkd8z8lhm566p0f2utm3lgvxrsdehnl94y34txmts5s7t4c",
|
"tb1pn2d0yjeedavnkd8z8lhm566p0f2utm3lgvxrsdehnl94y34txmts5s7t4c",
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"Bitcoin",
|
"Bitcoin",
|
||||||
"86'/0'/0'/0/0",
|
"86'/0'/0'/0/0",
|
||||||
proto.InputScriptType.SPENDTAPROOT,
|
messages.InputScriptType.SPENDTAPROOT,
|
||||||
"bc1ptxs597p3fnpd8gwut5p467ulsydae3rp9z75hd99w8k3ljr9g9rqx6ynaw",
|
"bc1ptxs597p3fnpd8gwut5p467ulsydae3rp9z75hd99w8k3ljr9g9rqx6ynaw",
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"Bitcoin",
|
"Bitcoin",
|
||||||
"86'/0'/0'/1/0",
|
"86'/0'/0'/1/0",
|
||||||
proto.InputScriptType.SPENDTAPROOT,
|
messages.InputScriptType.SPENDTAPROOT,
|
||||||
"bc1pgypgja2hmcx2l6s2ssq75k6ev68ved6nujcspt47dgvkp8euc70s6uegk6",
|
"bc1pgypgja2hmcx2l6s2ssq75k6ev68ved6nujcspt47dgvkp8euc70s6uegk6",
|
||||||
),
|
),
|
||||||
pytest.param(
|
pytest.param(
|
||||||
@ -122,7 +122,7 @@ def test_bip86(client, path, address):
|
|||||||
parse_path(path),
|
parse_path(path),
|
||||||
False,
|
False,
|
||||||
None,
|
None,
|
||||||
script_type=proto.InputScriptType.SPENDTAPROOT,
|
script_type=messages.InputScriptType.SPENDTAPROOT,
|
||||||
)
|
)
|
||||||
== address
|
== address
|
||||||
)
|
)
|
@ -20,7 +20,7 @@ from trezorlib import btc, messages
|
|||||||
from trezorlib.exceptions import TrezorFailure
|
from trezorlib.exceptions import TrezorFailure
|
||||||
from trezorlib.tools import parse_path
|
from trezorlib.tools import parse_path
|
||||||
|
|
||||||
from .. import bip32
|
from ... import bip32
|
||||||
|
|
||||||
VECTORS_BITCOIN = ( # coin_name, xpub_magic, path, xpub
|
VECTORS_BITCOIN = ( # coin_name, xpub_magic, path, xpub
|
||||||
(
|
(
|
@ -19,7 +19,7 @@ import pytest
|
|||||||
from trezorlib import btc, messages
|
from trezorlib import btc, messages
|
||||||
from trezorlib.tools import parse_path
|
from trezorlib.tools import parse_path
|
||||||
|
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
|
|
||||||
B = messages.ButtonRequestType
|
B = messages.ButtonRequestType
|
||||||
TX_API = TxCache("Groestlcoin")
|
TX_API = TxCache("Groestlcoin")
|
@ -19,8 +19,8 @@ import pytest
|
|||||||
from trezorlib import btc, messages
|
from trezorlib import btc, messages
|
||||||
from trezorlib.tools import parse_path
|
from trezorlib.tools import parse_path
|
||||||
|
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
from .signtx import (
|
from ..signtx import (
|
||||||
request_extra_data,
|
request_extra_data,
|
||||||
request_finished,
|
request_finished,
|
||||||
request_input,
|
request_input,
|
@ -20,9 +20,9 @@ from trezorlib import btc, messages
|
|||||||
from trezorlib.exceptions import TrezorFailure
|
from trezorlib.exceptions import TrezorFailure
|
||||||
from trezorlib.tools import parse_path, tx_hash
|
from trezorlib.tools import parse_path, tx_hash
|
||||||
|
|
||||||
from ..common import MNEMONIC12
|
from ...common import MNEMONIC12
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
from .signtx import request_finished, request_input, request_meta, request_output
|
from ..signtx import request_finished, request_input, request_meta, request_output
|
||||||
|
|
||||||
B = messages.ButtonRequestType
|
B = messages.ButtonRequestType
|
||||||
TX_API = TxCache("Bitcoin")
|
TX_API = TxCache("Bitcoin")
|
@ -19,10 +19,10 @@ import pytest
|
|||||||
from trezorlib import btc, messages
|
from trezorlib import btc, messages
|
||||||
from trezorlib.tools import H_, parse_path
|
from trezorlib.tools import H_, parse_path
|
||||||
|
|
||||||
from .. import bip32
|
from ... import bip32
|
||||||
from ..common import MNEMONIC12
|
from ...common import MNEMONIC12
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
from .signtx import request_finished, request_input, request_meta, request_output
|
from ..signtx import request_finished, request_input, request_meta, request_output
|
||||||
|
|
||||||
B = messages.ButtonRequestType
|
B = messages.ButtonRequestType
|
||||||
TX_API = TxCache("Testnet")
|
TX_API = TxCache("Testnet")
|
||||||
@ -136,6 +136,7 @@ INP3 = messages.TxInputType(
|
|||||||
multisig=multisig_in3,
|
multisig=multisig_in3,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def _responses(INP1, INP2, change=0):
|
def _responses(INP1, INP2, change=0):
|
||||||
resp = [
|
resp = [
|
||||||
request_input(0),
|
request_input(0),
|
||||||
@ -219,9 +220,7 @@ def test_external_internal(client):
|
|||||||
)
|
)
|
||||||
|
|
||||||
with client:
|
with client:
|
||||||
client.set_expected_responses(
|
client.set_expected_responses(_responses(INP1, INP2, change=2))
|
||||||
_responses(INP1, INP2, change=2)
|
|
||||||
)
|
|
||||||
_, serialized_tx = btc.sign_tx(
|
_, serialized_tx = btc.sign_tx(
|
||||||
client,
|
client,
|
||||||
"Bitcoin",
|
"Bitcoin",
|
||||||
@ -251,9 +250,7 @@ def test_internal_external(client):
|
|||||||
)
|
)
|
||||||
|
|
||||||
with client:
|
with client:
|
||||||
client.set_expected_responses(
|
client.set_expected_responses(_responses(INP1, INP2, change=1))
|
||||||
_responses(INP1, INP2, change=1)
|
|
||||||
)
|
|
||||||
_, serialized_tx = btc.sign_tx(
|
_, serialized_tx = btc.sign_tx(
|
||||||
client,
|
client,
|
||||||
"Bitcoin",
|
"Bitcoin",
|
||||||
@ -321,9 +318,7 @@ def test_multisig_change_match_first(client):
|
|||||||
)
|
)
|
||||||
|
|
||||||
with client:
|
with client:
|
||||||
client.set_expected_responses(
|
client.set_expected_responses(_responses(INP1, INP2, change=1))
|
||||||
_responses(INP1, INP2, change=1)
|
|
||||||
)
|
|
||||||
_, serialized_tx = btc.sign_tx(
|
_, serialized_tx = btc.sign_tx(
|
||||||
client,
|
client,
|
||||||
"Bitcoin",
|
"Bitcoin",
|
||||||
@ -361,9 +356,7 @@ def test_multisig_change_match_second(client):
|
|||||||
)
|
)
|
||||||
|
|
||||||
with client:
|
with client:
|
||||||
client.set_expected_responses(
|
client.set_expected_responses(_responses(INP1, INP2, change=2))
|
||||||
_responses(INP1, INP2, change=2)
|
|
||||||
)
|
|
||||||
_, serialized_tx = btc.sign_tx(
|
_, serialized_tx = btc.sign_tx(
|
||||||
client,
|
client,
|
||||||
"Bitcoin",
|
"Bitcoin",
|
@ -19,7 +19,7 @@ import pytest
|
|||||||
from trezorlib import btc, messages
|
from trezorlib import btc, messages
|
||||||
from trezorlib.tools import parse_path
|
from trezorlib.tools import parse_path
|
||||||
|
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
|
|
||||||
TX_CACHE_MAINNET = TxCache("Bitcoin")
|
TX_CACHE_MAINNET = TxCache("Bitcoin")
|
||||||
|
|
@ -20,8 +20,8 @@ from trezorlib import btc, messages
|
|||||||
from trezorlib.exceptions import TrezorFailure
|
from trezorlib.exceptions import TrezorFailure
|
||||||
from trezorlib.tools import parse_path
|
from trezorlib.tools import parse_path
|
||||||
|
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
from .signtx import request_finished, request_input, request_meta, request_output
|
from ..signtx import request_finished, request_input, request_meta, request_output
|
||||||
|
|
||||||
B = messages.ButtonRequestType
|
B = messages.ButtonRequestType
|
||||||
TX_API = TxCache("Bitcoin")
|
TX_API = TxCache("Bitcoin")
|
@ -20,7 +20,7 @@ from trezorlib import btc, messages
|
|||||||
from trezorlib.exceptions import TrezorFailure
|
from trezorlib.exceptions import TrezorFailure
|
||||||
from trezorlib.tools import parse_path
|
from trezorlib.tools import parse_path
|
||||||
|
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
|
|
||||||
TX_CACHE = TxCache("Peercoin")
|
TX_CACHE = TxCache("Peercoin")
|
||||||
|
|
@ -22,9 +22,9 @@ from trezorlib import btc, device, messages
|
|||||||
from trezorlib.exceptions import TrezorFailure
|
from trezorlib.exceptions import TrezorFailure
|
||||||
from trezorlib.tools import H_, parse_path, tx_hash
|
from trezorlib.tools import H_, parse_path, tx_hash
|
||||||
|
|
||||||
from ..common import MNEMONIC12
|
from ...common import MNEMONIC12
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
from .signtx import request_finished, request_input, request_meta, request_output
|
from ..signtx import request_finished, request_input, request_meta, request_output
|
||||||
|
|
||||||
B = messages.ButtonRequestType
|
B = messages.ButtonRequestType
|
||||||
|
|
@ -19,7 +19,7 @@ import pytest
|
|||||||
from trezorlib import btc, messages
|
from trezorlib import btc, messages
|
||||||
from trezorlib.tools import parse_path
|
from trezorlib.tools import parse_path
|
||||||
|
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
|
|
||||||
TX_API = TxCache("Testnet")
|
TX_API = TxCache("Testnet")
|
||||||
|
|
@ -20,8 +20,8 @@ from trezorlib import btc, messages
|
|||||||
from trezorlib.exceptions import TrezorFailure
|
from trezorlib.exceptions import TrezorFailure
|
||||||
from trezorlib.tools import parse_path
|
from trezorlib.tools import parse_path
|
||||||
|
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
from .signtx import request_finished, request_input, request_meta, request_output
|
from ..signtx import request_finished, request_input, request_meta, request_output
|
||||||
|
|
||||||
B = messages.ButtonRequestType
|
B = messages.ButtonRequestType
|
||||||
|
|
@ -20,7 +20,7 @@ from trezorlib import btc, device, messages
|
|||||||
from trezorlib.exceptions import TrezorFailure
|
from trezorlib.exceptions import TrezorFailure
|
||||||
from trezorlib.tools import parse_path
|
from trezorlib.tools import parse_path
|
||||||
|
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
|
|
||||||
TX_CACHE_MAINNET = TxCache("Bitcoin")
|
TX_CACHE_MAINNET = TxCache("Bitcoin")
|
||||||
TX_CACHE_BCASH = TxCache("Bcash")
|
TX_CACHE_BCASH = TxCache("Bcash")
|
||||||
@ -34,6 +34,7 @@ TXHASH_d5f65e = bytes.fromhex(
|
|||||||
|
|
||||||
pytestmark = pytest.mark.altcoin
|
pytestmark = pytest.mark.altcoin
|
||||||
|
|
||||||
|
|
||||||
# Adapted from TestMsgSigntx.test_one_one_fee,
|
# Adapted from TestMsgSigntx.test_one_one_fee,
|
||||||
# only changed the coin from Bitcoin to Litecoin.
|
# only changed the coin from Bitcoin to Litecoin.
|
||||||
# Litecoin does not have strong replay protection using SIGHASH_FORKID,
|
# Litecoin does not have strong replay protection using SIGHASH_FORKID,
|
@ -17,7 +17,7 @@
|
|||||||
from trezorlib import btc, messages
|
from trezorlib import btc, messages
|
||||||
from trezorlib.tools import parse_path
|
from trezorlib.tools import parse_path
|
||||||
|
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
|
|
||||||
TX_API = TxCache("Testnet")
|
TX_API = TxCache("Testnet")
|
||||||
|
|
@ -6,7 +6,7 @@ import pytest
|
|||||||
from trezorlib import btc, messages, tools
|
from trezorlib import btc, messages, tools
|
||||||
from trezorlib.exceptions import TrezorFailure
|
from trezorlib.exceptions import TrezorFailure
|
||||||
|
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
|
|
||||||
TXHASH_157041 = bytes.fromhex(
|
TXHASH_157041 = bytes.fromhex(
|
||||||
"1570416eb4302cf52979afd5e6909e37d8fdd874301f7cc87e547e509cb1caa6"
|
"1570416eb4302cf52979afd5e6909e37d8fdd874301f7cc87e547e509cb1caa6"
|
@ -20,8 +20,8 @@ from trezorlib import btc, messages
|
|||||||
from trezorlib.exceptions import TrezorFailure
|
from trezorlib.exceptions import TrezorFailure
|
||||||
from trezorlib.tools import parse_path
|
from trezorlib.tools import parse_path
|
||||||
|
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
from .signtx import (
|
from ..signtx import (
|
||||||
request_finished,
|
request_finished,
|
||||||
request_input,
|
request_input,
|
||||||
request_meta,
|
request_meta,
|
@ -20,8 +20,8 @@ from trezorlib import btc, messages
|
|||||||
from trezorlib.exceptions import TrezorFailure
|
from trezorlib.exceptions import TrezorFailure
|
||||||
from trezorlib.tools import H_, parse_path
|
from trezorlib.tools import H_, parse_path
|
||||||
|
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
from .signtx import request_finished, request_input, request_meta, request_output
|
from ..signtx import request_finished, request_input, request_meta, request_output
|
||||||
|
|
||||||
B = messages.ButtonRequestType
|
B = messages.ButtonRequestType
|
||||||
TX_API = TxCache("Testnet")
|
TX_API = TxCache("Testnet")
|
@ -19,9 +19,9 @@ import pytest
|
|||||||
from trezorlib import btc, messages
|
from trezorlib import btc, messages
|
||||||
from trezorlib.tools import H_, parse_path
|
from trezorlib.tools import H_, parse_path
|
||||||
|
|
||||||
from ..bip32 import deserialize
|
from ...bip32 import deserialize
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
from .signtx import request_finished, request_input, request_meta, request_output
|
from ..signtx import request_finished, request_input, request_meta, request_output
|
||||||
|
|
||||||
B = messages.ButtonRequestType
|
B = messages.ButtonRequestType
|
||||||
TX_API = TxCache("Testnet")
|
TX_API = TxCache("Testnet")
|
@ -20,8 +20,8 @@ from trezorlib import btc, messages
|
|||||||
from trezorlib.exceptions import TrezorFailure
|
from trezorlib.exceptions import TrezorFailure
|
||||||
from trezorlib.tools import H_, parse_path
|
from trezorlib.tools import H_, parse_path
|
||||||
|
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
from .signtx import request_finished, request_input, request_meta, request_output
|
from ..signtx import request_finished, request_input, request_meta, request_output
|
||||||
|
|
||||||
B = messages.ButtonRequestType
|
B = messages.ButtonRequestType
|
||||||
TX_API = TxCache("Testnet")
|
TX_API = TxCache("Testnet")
|
@ -20,8 +20,8 @@ from trezorlib import btc, messages
|
|||||||
from trezorlib.exceptions import TrezorFailure
|
from trezorlib.exceptions import TrezorFailure
|
||||||
from trezorlib.tools import parse_path
|
from trezorlib.tools import parse_path
|
||||||
|
|
||||||
from ..tx_cache import TxCache
|
from ...tx_cache import TxCache
|
||||||
from .signtx import (
|
from ..signtx import (
|
||||||
request_extra_data,
|
request_extra_data,
|
||||||
request_finished,
|
request_finished,
|
||||||
request_input,
|
request_input,
|
@ -18,7 +18,7 @@ import pytest
|
|||||||
|
|
||||||
from trezorlib import misc
|
from trezorlib import misc
|
||||||
|
|
||||||
from ..common import MNEMONIC12
|
from ...common import MNEMONIC12
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.setup_client(mnemonic=MNEMONIC12)
|
@pytest.mark.setup_client(mnemonic=MNEMONIC12)
|
@ -18,7 +18,7 @@ import pytest
|
|||||||
|
|
||||||
from trezorlib import messages, misc
|
from trezorlib import messages, misc
|
||||||
|
|
||||||
from ..common import MNEMONIC12
|
from ...common import MNEMONIC12
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.setup_client(mnemonic=MNEMONIC12)
|
@pytest.mark.setup_client(mnemonic=MNEMONIC12)
|
@ -18,7 +18,7 @@ import pytest
|
|||||||
|
|
||||||
from trezorlib import messages, misc
|
from trezorlib import messages, misc
|
||||||
|
|
||||||
from ..common import MNEMONIC12
|
from ...common import MNEMONIC12
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.setup_client(mnemonic=MNEMONIC12)
|
@pytest.mark.setup_client(mnemonic=MNEMONIC12)
|
0
tests/device_tests/reset_recovery/__init__.py
Normal file
0
tests/device_tests/reset_recovery/__init__.py
Normal file
@ -23,7 +23,7 @@ from ...common import MNEMONIC12
|
|||||||
PIN4 = "1234"
|
PIN4 = "1234"
|
||||||
PIN6 = "789456"
|
PIN6 = "789456"
|
||||||
|
|
||||||
pytestmark = [pytest.mark.skip_t2]
|
pytestmark = pytest.mark.skip_t2
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.setup_client(uninitialized=True)
|
@pytest.mark.setup_client(uninitialized=True)
|
@ -23,7 +23,7 @@ from shamir_mnemonic import shamir
|
|||||||
from trezorlib import device, messages
|
from trezorlib import device, messages
|
||||||
from trezorlib.messages import BackupType, ButtonRequestType as B
|
from trezorlib.messages import BackupType, ButtonRequestType as B
|
||||||
|
|
||||||
from ..common import EXTERNAL_ENTROPY, click_through, read_and_confirm_mnemonic
|
from ...common import EXTERNAL_ENTROPY, click_through, read_and_confirm_mnemonic
|
||||||
|
|
||||||
|
|
||||||
def backup_flow_bip39(client):
|
def backup_flow_bip39(client):
|
@ -21,7 +21,7 @@ from trezorlib import messages
|
|||||||
|
|
||||||
from ...common import generate_entropy
|
from ...common import generate_entropy
|
||||||
|
|
||||||
pytestmark = [pytest.mark.skip_t2]
|
pytestmark = pytest.mark.skip_t2
|
||||||
|
|
||||||
EXTERNAL_ENTROPY = b"zlutoucky kun upel divoke ody" * 2
|
EXTERNAL_ENTROPY = b"zlutoucky kun upel divoke ody" * 2
|
||||||
STRENGTH = 128
|
STRENGTH = 128
|
@ -21,7 +21,7 @@ from trezorlib import device, messages
|
|||||||
|
|
||||||
from ...common import generate_entropy
|
from ...common import generate_entropy
|
||||||
|
|
||||||
pytestmark = [pytest.mark.skip_t1]
|
pytestmark = pytest.mark.skip_t2
|
||||||
|
|
||||||
|
|
||||||
def reset_device(client, strength):
|
def reset_device(client, strength):
|
@ -23,7 +23,7 @@ from trezorlib import btc, device, messages
|
|||||||
from trezorlib.messages import BackupType, ButtonRequestType as B
|
from trezorlib.messages import BackupType, ButtonRequestType as B
|
||||||
from trezorlib.tools import parse_path
|
from trezorlib.tools import parse_path
|
||||||
|
|
||||||
from ..common import EXTERNAL_ENTROPY, click_through, read_and_confirm_mnemonic
|
from ...common import EXTERNAL_ENTROPY, click_through, read_and_confirm_mnemonic
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skip_t1
|
@pytest.mark.skip_t1
|
@ -22,7 +22,7 @@ from trezorlib import btc, device, messages
|
|||||||
from trezorlib.messages import BackupType, ButtonRequestType as B
|
from trezorlib.messages import BackupType, ButtonRequestType as B
|
||||||
from trezorlib.tools import parse_path
|
from trezorlib.tools import parse_path
|
||||||
|
|
||||||
from ..common import (
|
from ...common import (
|
||||||
EXTERNAL_ENTROPY,
|
EXTERNAL_ENTROPY,
|
||||||
click_through,
|
click_through,
|
||||||
read_and_confirm_mnemonic,
|
read_and_confirm_mnemonic,
|
@ -23,7 +23,7 @@ from trezorlib import btc, device, messages
|
|||||||
from trezorlib.messages import BackupType, ButtonRequestType as B
|
from trezorlib.messages import BackupType, ButtonRequestType as B
|
||||||
from trezorlib.tools import parse_path
|
from trezorlib.tools import parse_path
|
||||||
|
|
||||||
from ..common import click_through, read_and_confirm_mnemonic, recovery_enter_shares
|
from ...common import click_through, read_and_confirm_mnemonic, recovery_enter_shares
|
||||||
|
|
||||||
EXTERNAL_ENTROPY = b"zlutoucky kun upel divoke ody" * 2
|
EXTERNAL_ENTROPY = b"zlutoucky kun upel divoke ody" * 2
|
||||||
MOCK_OS_URANDOM = mock.Mock(return_value=EXTERNAL_ENTROPY)
|
MOCK_OS_URANDOM = mock.Mock(return_value=EXTERNAL_ENTROPY)
|
0
tests/device_tests/stellar/__init__.py
Normal file
0
tests/device_tests/stellar/__init__.py
Normal file
@ -57,7 +57,7 @@ import pytest
|
|||||||
from trezorlib import messages, protobuf, stellar
|
from trezorlib import messages, protobuf, stellar
|
||||||
from trezorlib.tools import parse_path
|
from trezorlib.tools import parse_path
|
||||||
|
|
||||||
from ..common import parametrize_using_common_fixtures
|
from ...common import parametrize_using_common_fixtures
|
||||||
|
|
||||||
|
|
||||||
def parameters_to_proto(parameters):
|
def parameters_to_proto(parameters):
|
0
tests/device_tests/webauthn/__init__.py
Normal file
0
tests/device_tests/webauthn/__init__.py
Normal file
@ -19,7 +19,7 @@ import pytest
|
|||||||
from trezorlib import fido
|
from trezorlib import fido
|
||||||
from trezorlib.exceptions import Cancelled, TrezorFailure
|
from trezorlib.exceptions import Cancelled, TrezorFailure
|
||||||
|
|
||||||
from ..common import MNEMONIC12
|
from ...common import MNEMONIC12
|
||||||
from .data_webauthn import CRED1, CRED2, CRED3, CREDS
|
from .data_webauthn import CRED1, CRED2, CRED3, CREDS
|
||||||
|
|
||||||
RK_CAPACITY = 100
|
RK_CAPACITY = 100
|
Loading…
Reference in New Issue
Block a user