From eb6f6dd572f13d52fdcd7bb25c87b4c246ce9cb7 Mon Sep 17 00:00:00 2001 From: matejcik Date: Tue, 6 Aug 2019 14:42:11 +0200 Subject: [PATCH] tests: move tx_cache impl --- tests/device_tests/test_msg_signtx.py | 2 +- tests/device_tests/test_msg_signtx_bcash.py | 2 +- tests/device_tests/test_msg_signtx_bgold.py | 2 +- tests/device_tests/test_msg_signtx_capricoin.py | 2 +- tests/device_tests/test_msg_signtx_dash.py | 2 +- tests/device_tests/test_msg_signtx_decred.py | 2 +- tests/device_tests/test_msg_signtx_grs.py | 2 +- tests/device_tests/test_msg_signtx_komodo.py | 2 +- tests/device_tests/test_msg_signtx_segwit.py | 2 +- tests/device_tests/test_msg_signtx_segwit_native.py | 2 +- tests/device_tests/test_msg_signtx_zcash.py | 2 +- tests/device_tests/test_multisig.py | 2 +- tests/device_tests/test_multisig_change.py | 2 +- tests/device_tests/test_op_return.py | 2 +- tests/device_tests/test_protection_levels.py | 2 +- tests/device_tests/test_zerosig.py | 2 +- .../trezorlib/tests/support => tests/device_tests}/tx_cache.py | 0 17 files changed, 16 insertions(+), 16 deletions(-) rename {python/trezorlib/tests/support => tests/device_tests}/tx_cache.py (100%) diff --git a/tests/device_tests/test_msg_signtx.py b/tests/device_tests/test_msg_signtx.py index 83b0f03ab..0a086dfd7 100644 --- a/tests/device_tests/test_msg_signtx.py +++ b/tests/device_tests/test_msg_signtx.py @@ -19,9 +19,9 @@ import pytest from trezorlib import btc, messages as proto from trezorlib.tools import H_, CallException, btc_hash, parse_path -from ..support.tx_cache import tx_cache from .common import TrezorTest from .conftest import TREZOR_VERSION +from .tx_cache import tx_cache TXHASH_157041 = bytes.fromhex( "1570416eb4302cf52979afd5e6909e37d8fdd874301f7cc87e547e509cb1caa6" diff --git a/tests/device_tests/test_msg_signtx_bcash.py b/tests/device_tests/test_msg_signtx_bcash.py index 07744203a..892efa2a7 100644 --- a/tests/device_tests/test_msg_signtx_bcash.py +++ b/tests/device_tests/test_msg_signtx_bcash.py @@ -20,8 +20,8 @@ from trezorlib import btc, messages as proto from trezorlib.tools import H_, CallException, parse_path from ..support.ckd_public import deserialize -from ..support.tx_cache import tx_cache from .common import TrezorTest +from .tx_cache import tx_cache TX_API = tx_cache("Bcash") diff --git a/tests/device_tests/test_msg_signtx_bgold.py b/tests/device_tests/test_msg_signtx_bgold.py index ff3f80249..9a24c572e 100644 --- a/tests/device_tests/test_msg_signtx_bgold.py +++ b/tests/device_tests/test_msg_signtx_bgold.py @@ -20,8 +20,8 @@ from trezorlib import btc, messages as proto from trezorlib.tools import H_, CallException, parse_path from ..support.ckd_public import deserialize -from ..support.tx_cache import tx_cache from .common import TrezorTest +from .tx_cache import tx_cache TX_API = tx_cache("Bgold") diff --git a/tests/device_tests/test_msg_signtx_capricoin.py b/tests/device_tests/test_msg_signtx_capricoin.py index d8f5f7bde..3721e8e17 100644 --- a/tests/device_tests/test_msg_signtx_capricoin.py +++ b/tests/device_tests/test_msg_signtx_capricoin.py @@ -19,8 +19,8 @@ import pytest from trezorlib import btc, messages from trezorlib.tools import parse_path -from ..support.tx_cache import tx_cache from .conftest import setup_client +from .tx_cache import tx_cache TXHASH_3bf506 = bytes.fromhex( "3bf506c81ce84eda891679ddc797d162c17c60b15d6c0ac23be5e31369e7235f" diff --git a/tests/device_tests/test_msg_signtx_dash.py b/tests/device_tests/test_msg_signtx_dash.py index e420a2292..bd169fe63 100644 --- a/tests/device_tests/test_msg_signtx_dash.py +++ b/tests/device_tests/test_msg_signtx_dash.py @@ -17,8 +17,8 @@ from trezorlib import btc, messages as proto from trezorlib.tools import parse_path -from ..support.tx_cache import tx_cache from .common import TrezorTest +from .tx_cache import tx_cache TX_API = tx_cache("Dash") diff --git a/tests/device_tests/test_msg_signtx_decred.py b/tests/device_tests/test_msg_signtx_decred.py index 18730ff77..13c234b0f 100644 --- a/tests/device_tests/test_msg_signtx_decred.py +++ b/tests/device_tests/test_msg_signtx_decred.py @@ -19,8 +19,8 @@ import pytest from trezorlib import btc, messages as proto from trezorlib.tools import parse_path -from ..support.tx_cache import tx_cache from .common import TrezorTest +from .tx_cache import tx_cache TX_API = tx_cache("Decred Testnet") diff --git a/tests/device_tests/test_msg_signtx_grs.py b/tests/device_tests/test_msg_signtx_grs.py index 674c2ebeb..687c576ab 100644 --- a/tests/device_tests/test_msg_signtx_grs.py +++ b/tests/device_tests/test_msg_signtx_grs.py @@ -17,8 +17,8 @@ from trezorlib import btc, messages as proto from trezorlib.tools import parse_path -from ..support.tx_cache import tx_cache from .common import TrezorTest +from .tx_cache import tx_cache TX_API = tx_cache("Groestlcoin") diff --git a/tests/device_tests/test_msg_signtx_komodo.py b/tests/device_tests/test_msg_signtx_komodo.py index e6f37d06e..9fa6b2cf6 100644 --- a/tests/device_tests/test_msg_signtx_komodo.py +++ b/tests/device_tests/test_msg_signtx_komodo.py @@ -19,9 +19,9 @@ import pytest from trezorlib import btc, messages as proto from trezorlib.tools import parse_path -from ..support.tx_cache import tx_cache from .common import TrezorTest from .conftest import TREZOR_VERSION +from .tx_cache import tx_cache # KMD has no usable backends, use cached TX only TX_API = tx_cache("Komodo", allow_fetch=False) diff --git a/tests/device_tests/test_msg_signtx_segwit.py b/tests/device_tests/test_msg_signtx_segwit.py index db0db10f3..080cf9e48 100644 --- a/tests/device_tests/test_msg_signtx_segwit.py +++ b/tests/device_tests/test_msg_signtx_segwit.py @@ -20,9 +20,9 @@ from trezorlib import btc, messages as proto from trezorlib.tools import H_, CallException, parse_path from ..support.ckd_public import deserialize -from ..support.tx_cache import tx_cache from .common import TrezorTest from .conftest import TREZOR_VERSION +from .tx_cache import tx_cache TX_API = tx_cache("Testnet") diff --git a/tests/device_tests/test_msg_signtx_segwit_native.py b/tests/device_tests/test_msg_signtx_segwit_native.py index 13932d7d0..f7d9cd3d8 100644 --- a/tests/device_tests/test_msg_signtx_segwit_native.py +++ b/tests/device_tests/test_msg_signtx_segwit_native.py @@ -18,8 +18,8 @@ from trezorlib import btc, messages as proto from trezorlib.tools import H_, parse_path from ..support.ckd_public import deserialize -from ..support.tx_cache import tx_cache from .common import TrezorTest +from .tx_cache import tx_cache TX_API = tx_cache("Testnet") diff --git a/tests/device_tests/test_msg_signtx_zcash.py b/tests/device_tests/test_msg_signtx_zcash.py index 3cf28dd23..7d9f8c33e 100644 --- a/tests/device_tests/test_msg_signtx_zcash.py +++ b/tests/device_tests/test_msg_signtx_zcash.py @@ -19,8 +19,8 @@ import pytest from trezorlib import btc, messages as proto from trezorlib.tools import parse_path -from ..support.tx_cache import tx_cache from .common import TrezorTest +from .tx_cache import tx_cache TX_API = tx_cache("Zcash Testnet") diff --git a/tests/device_tests/test_multisig.py b/tests/device_tests/test_multisig.py index 2933956ae..438b03fa2 100644 --- a/tests/device_tests/test_multisig.py +++ b/tests/device_tests/test_multisig.py @@ -21,8 +21,8 @@ from trezorlib.tools import CallException, parse_path from ..support import ckd_public as bip32 from ..support.ckd_public import deserialize -from ..support.tx_cache import tx_cache from .common import TrezorTest +from .tx_cache import tx_cache TX_API = tx_cache("Bitcoin") diff --git a/tests/device_tests/test_multisig_change.py b/tests/device_tests/test_multisig_change.py index 60be1312a..4f6ae7b0d 100644 --- a/tests/device_tests/test_multisig_change.py +++ b/tests/device_tests/test_multisig_change.py @@ -18,8 +18,8 @@ from trezorlib import btc, messages as proto from trezorlib.tools import H_, parse_path from ..support import ckd_public as bip32 -from ..support.tx_cache import tx_cache from .common import TrezorTest +from .tx_cache import tx_cache TX_API = tx_cache("Testnet") diff --git a/tests/device_tests/test_op_return.py b/tests/device_tests/test_op_return.py index 1519bf362..ac03fef65 100644 --- a/tests/device_tests/test_op_return.py +++ b/tests/device_tests/test_op_return.py @@ -19,9 +19,9 @@ import pytest from trezorlib import btc, messages as proto from trezorlib.tools import CallException, parse_path -from ..support.tx_cache import tx_cache from .common import TrezorTest from .conftest import TREZOR_VERSION +from .tx_cache import tx_cache TX_API = tx_cache("Bitcoin") diff --git a/tests/device_tests/test_protection_levels.py b/tests/device_tests/test_protection_levels.py index f284970a7..199f3294f 100644 --- a/tests/device_tests/test_protection_levels.py +++ b/tests/device_tests/test_protection_levels.py @@ -18,8 +18,8 @@ import pytest from trezorlib import btc, debuglink, device, messages as proto, misc -from ..support.tx_cache import tx_cache from .common import TrezorTest +from .tx_cache import tx_cache TXHASH_d5f65e = bytes.fromhex( "d5f65ee80147b4bcc70b75e4bbf2d7382021b871bd8867ef8fa525ef50864882" diff --git a/tests/device_tests/test_zerosig.py b/tests/device_tests/test_zerosig.py index 6bb0e7765..a4573dd89 100644 --- a/tests/device_tests/test_zerosig.py +++ b/tests/device_tests/test_zerosig.py @@ -16,8 +16,8 @@ from trezorlib import btc, messages as proto -from ..support.tx_cache import tx_cache from .common import TrezorTest +from .tx_cache import tx_cache TXHASH_d5f65e = bytes.fromhex( "d5f65ee80147b4bcc70b75e4bbf2d7382021b871bd8867ef8fa525ef50864882" diff --git a/python/trezorlib/tests/support/tx_cache.py b/tests/device_tests/tx_cache.py similarity index 100% rename from python/trezorlib/tests/support/tx_cache.py rename to tests/device_tests/tx_cache.py