From 123aec5d7dfdadd783f9f480f10a00728b1399ee Mon Sep 17 00:00:00 2001 From: matejcik Date: Fri, 11 May 2018 14:53:51 +0200 Subject: [PATCH] tests/device_tests: remove all star imports --- trezorlib/tests/device_tests/test_basic.py | 2 +- trezorlib/tests/device_tests/test_bip32_speed.py | 7 +++---- trezorlib/tests/device_tests/test_debuglink.py | 4 ++-- .../tests/device_tests/test_msg_applysettings.py | 3 ++- trezorlib/tests/device_tests/test_msg_changepin.py | 3 ++- .../tests/device_tests/test_msg_cipherkeyvalue.py | 4 +++- trezorlib/tests/device_tests/test_msg_clearsession.py | 3 ++- .../device_tests/test_msg_ethereum_getaddress.py | 3 ++- .../device_tests/test_msg_ethereum_signmessage.py | 4 +++- .../tests/device_tests/test_msg_ethereum_signtx.py | 5 ++++- .../device_tests/test_msg_ethereum_verifymessage.py | 5 ++++- .../tests/device_tests/test_msg_getecdhsessionkey.py | 3 ++- trezorlib/tests/device_tests/test_msg_getentropy.py | 3 +-- trezorlib/tests/device_tests/test_msg_loaddevice.py | 3 ++- .../tests/device_tests/test_msg_loaddevice_xprv.py | 3 ++- trezorlib/tests/device_tests/test_msg_ping.py | 3 ++- .../tests/device_tests/test_msg_recoverydevice.py | 4 ++-- .../device_tests/test_msg_recoverydevice_dryrun.py | 4 ++-- .../tests/device_tests/test_msg_recoverydevice_t2.py | 5 +++-- trezorlib/tests/device_tests/test_msg_resetdevice.py | 3 ++- .../device_tests/test_msg_resetdevice_skipbackup.py | 3 ++- .../tests/device_tests/test_msg_resetdevice_t2.py | 3 ++- trezorlib/tests/device_tests/test_msg_signidentity.py | 5 +++-- trezorlib/tests/device_tests/test_msg_signmessage.py | 3 ++- .../tests/device_tests/test_msg_signmessage_segwit.py | 3 ++- .../test_msg_signmessage_segwit_native.py | 3 ++- .../tests/device_tests/test_msg_signtx_decred.py | 2 +- trezorlib/tests/device_tests/test_msg_signtx_zcash.py | 11 ++++++----- .../tests/device_tests/test_msg_verifymessage.py | 4 ++-- .../device_tests/test_msg_verifymessage_segwit.py | 4 ++-- .../test_msg_verifymessage_segwit_native.py | 4 ++-- trezorlib/tests/device_tests/test_msg_wipedevice.py | 2 +- trezorlib/tests/device_tests/test_op_return.py | 3 ++- trezorlib/tests/device_tests/test_protect_call.py | 6 +++--- .../tests/device_tests/test_protection_levels.py | 4 +++- trezorlib/tests/device_tests/test_zerosig.py | 7 ++----- 36 files changed, 83 insertions(+), 58 deletions(-) diff --git a/trezorlib/tests/device_tests/test_basic.py b/trezorlib/tests/device_tests/test_basic.py index 902b385351..fbba93212e 100644 --- a/trezorlib/tests/device_tests/test_basic.py +++ b/trezorlib/tests/device_tests/test_basic.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . -from .common import * +from .common import TrezorTest from trezorlib import messages diff --git a/trezorlib/tests/device_tests/test_bip32_speed.py b/trezorlib/tests/device_tests/test_bip32_speed.py index 11c7ecbf88..04ffa79001 100644 --- a/trezorlib/tests/device_tests/test_bip32_speed.py +++ b/trezorlib/tests/device_tests/test_bip32_speed.py @@ -15,11 +15,10 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . - -from __future__ import print_function - -from .common import * import time +import pytest + +from .common import TrezorTest class TestBip32Speed(TrezorTest): diff --git a/trezorlib/tests/device_tests/test_debuglink.py b/trezorlib/tests/device_tests/test_debuglink.py index 795d2f9668..ab9dc91776 100644 --- a/trezorlib/tests/device_tests/test_debuglink.py +++ b/trezorlib/tests/device_tests/test_debuglink.py @@ -15,9 +15,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +import pytest -from .common import * - +from .common import TrezorTest from trezorlib import messages as proto diff --git a/trezorlib/tests/device_tests/test_msg_applysettings.py b/trezorlib/tests/device_tests/test_msg_applysettings.py index 07bf805d47..c5511658c9 100644 --- a/trezorlib/tests/device_tests/test_msg_applysettings.py +++ b/trezorlib/tests/device_tests/test_msg_applysettings.py @@ -15,8 +15,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +import pytest -from .common import * +from .common import TrezorTest import time from trezorlib import messages as proto diff --git a/trezorlib/tests/device_tests/test_msg_changepin.py b/trezorlib/tests/device_tests/test_msg_changepin.py index bab268044c..3d40bbafbb 100644 --- a/trezorlib/tests/device_tests/test_msg_changepin.py +++ b/trezorlib/tests/device_tests/test_msg_changepin.py @@ -15,8 +15,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +import pytest -from .common import * +from .common import TrezorTest from trezorlib import messages as proto diff --git a/trezorlib/tests/device_tests/test_msg_cipherkeyvalue.py b/trezorlib/tests/device_tests/test_msg_cipherkeyvalue.py index de01f1e141..174145a3e2 100644 --- a/trezorlib/tests/device_tests/test_msg_cipherkeyvalue.py +++ b/trezorlib/tests/device_tests/test_msg_cipherkeyvalue.py @@ -15,8 +15,10 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +from binascii import hexlify, unhexlify +import pytest -from .common import * +from .common import TrezorTest class TestMsgCipherkeyvalue(TrezorTest): diff --git a/trezorlib/tests/device_tests/test_msg_clearsession.py b/trezorlib/tests/device_tests/test_msg_clearsession.py index 4452fd12bc..64c90db976 100644 --- a/trezorlib/tests/device_tests/test_msg_clearsession.py +++ b/trezorlib/tests/device_tests/test_msg_clearsession.py @@ -15,8 +15,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +import pytest -from .common import * +from .common import TrezorTest from trezorlib import messages as proto diff --git a/trezorlib/tests/device_tests/test_msg_ethereum_getaddress.py b/trezorlib/tests/device_tests/test_msg_ethereum_getaddress.py index b1e04f28f0..19cce76c69 100644 --- a/trezorlib/tests/device_tests/test_msg_ethereum_getaddress.py +++ b/trezorlib/tests/device_tests/test_msg_ethereum_getaddress.py @@ -15,8 +15,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +from binascii import hexlify -from .common import * +from .common import TrezorTest class TestMsgEthereumGetaddress(TrezorTest): diff --git a/trezorlib/tests/device_tests/test_msg_ethereum_signmessage.py b/trezorlib/tests/device_tests/test_msg_ethereum_signmessage.py index 24531b21c4..6e55deae29 100644 --- a/trezorlib/tests/device_tests/test_msg_ethereum_signmessage.py +++ b/trezorlib/tests/device_tests/test_msg_ethereum_signmessage.py @@ -14,8 +14,10 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +from binascii import hexlify +import pytest -from .common import * +from .common import TrezorTest @pytest.mark.skip_t2 diff --git a/trezorlib/tests/device_tests/test_msg_ethereum_signtx.py b/trezorlib/tests/device_tests/test_msg_ethereum_signtx.py index 825848ecca..d6188bc1dc 100644 --- a/trezorlib/tests/device_tests/test_msg_ethereum_signtx.py +++ b/trezorlib/tests/device_tests/test_msg_ethereum_signtx.py @@ -15,8 +15,11 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +from binascii import unhexlify, hexlify -from .common import * +import pytest + +from .common import TrezorTest from trezorlib import messages as proto diff --git a/trezorlib/tests/device_tests/test_msg_ethereum_verifymessage.py b/trezorlib/tests/device_tests/test_msg_ethereum_verifymessage.py index 7b27d24a69..94bf62a08e 100644 --- a/trezorlib/tests/device_tests/test_msg_ethereum_verifymessage.py +++ b/trezorlib/tests/device_tests/test_msg_ethereum_verifymessage.py @@ -14,8 +14,11 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +from binascii import unhexlify -from .common import * +import pytest + +from .common import TrezorTest @pytest.mark.skip_t2 diff --git a/trezorlib/tests/device_tests/test_msg_getecdhsessionkey.py b/trezorlib/tests/device_tests/test_msg_getecdhsessionkey.py index b411abc11f..c7049c5ffe 100644 --- a/trezorlib/tests/device_tests/test_msg_getecdhsessionkey.py +++ b/trezorlib/tests/device_tests/test_msg_getecdhsessionkey.py @@ -15,8 +15,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +from binascii import unhexlify -from .common import * +from .common import TrezorTest from trezorlib import messages as proto diff --git a/trezorlib/tests/device_tests/test_msg_getentropy.py b/trezorlib/tests/device_tests/test_msg_getentropy.py index 14a0df3bb6..bee7f6a182 100644 --- a/trezorlib/tests/device_tests/test_msg_getentropy.py +++ b/trezorlib/tests/device_tests/test_msg_getentropy.py @@ -16,10 +16,9 @@ # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . -from __future__ import print_function import math -from .common import * +from .common import TrezorTest import trezorlib.messages as proto diff --git a/trezorlib/tests/device_tests/test_msg_loaddevice.py b/trezorlib/tests/device_tests/test_msg_loaddevice.py index e52840883f..317132aee8 100644 --- a/trezorlib/tests/device_tests/test_msg_loaddevice.py +++ b/trezorlib/tests/device_tests/test_msg_loaddevice.py @@ -15,8 +15,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +import pytest -from .common import * +from .common import TrezorTest @pytest.mark.skip_t2 diff --git a/trezorlib/tests/device_tests/test_msg_loaddevice_xprv.py b/trezorlib/tests/device_tests/test_msg_loaddevice_xprv.py index e28a633a6d..b7017f1ca8 100644 --- a/trezorlib/tests/device_tests/test_msg_loaddevice_xprv.py +++ b/trezorlib/tests/device_tests/test_msg_loaddevice_xprv.py @@ -15,8 +15,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +import pytest -from .common import * +from .common import TrezorTest @pytest.mark.skip_t2 diff --git a/trezorlib/tests/device_tests/test_msg_ping.py b/trezorlib/tests/device_tests/test_msg_ping.py index e797e1dab5..c5c129a770 100644 --- a/trezorlib/tests/device_tests/test_msg_ping.py +++ b/trezorlib/tests/device_tests/test_msg_ping.py @@ -15,8 +15,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +import pytest -from .common import * +from .common import TrezorTest from trezorlib import messages as proto diff --git a/trezorlib/tests/device_tests/test_msg_recoverydevice.py b/trezorlib/tests/device_tests/test_msg_recoverydevice.py index 79eddecd0a..b8bd50b8cd 100644 --- a/trezorlib/tests/device_tests/test_msg_recoverydevice.py +++ b/trezorlib/tests/device_tests/test_msg_recoverydevice.py @@ -16,9 +16,9 @@ # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . -from __future__ import print_function +import pytest -from .common import * +from .common import TrezorTest from trezorlib import messages as proto diff --git a/trezorlib/tests/device_tests/test_msg_recoverydevice_dryrun.py b/trezorlib/tests/device_tests/test_msg_recoverydevice_dryrun.py index fed37ac871..0f575d3a10 100644 --- a/trezorlib/tests/device_tests/test_msg_recoverydevice_dryrun.py +++ b/trezorlib/tests/device_tests/test_msg_recoverydevice_dryrun.py @@ -16,9 +16,9 @@ # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . -from __future__ import print_function +import pytest -from .common import * +from .common import TrezorTest from trezorlib import messages as proto diff --git a/trezorlib/tests/device_tests/test_msg_recoverydevice_t2.py b/trezorlib/tests/device_tests/test_msg_recoverydevice_t2.py index 88240219a3..ee2e2d994b 100644 --- a/trezorlib/tests/device_tests/test_msg_recoverydevice_t2.py +++ b/trezorlib/tests/device_tests/test_msg_recoverydevice_t2.py @@ -16,11 +16,12 @@ # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . -from __future__ import print_function import time -from .common import * +import pytest + +from .common import TrezorTest from trezorlib import messages as proto diff --git a/trezorlib/tests/device_tests/test_msg_resetdevice.py b/trezorlib/tests/device_tests/test_msg_resetdevice.py index b8a63a745c..2286b523c1 100644 --- a/trezorlib/tests/device_tests/test_msg_resetdevice.py +++ b/trezorlib/tests/device_tests/test_msg_resetdevice.py @@ -15,8 +15,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +import pytest -from .common import * +from .common import TrezorTest, generate_entropy from trezorlib import messages as proto from mnemonic import Mnemonic diff --git a/trezorlib/tests/device_tests/test_msg_resetdevice_skipbackup.py b/trezorlib/tests/device_tests/test_msg_resetdevice_skipbackup.py index 8893710967..127bcb48ed 100644 --- a/trezorlib/tests/device_tests/test_msg_resetdevice_skipbackup.py +++ b/trezorlib/tests/device_tests/test_msg_resetdevice_skipbackup.py @@ -15,8 +15,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +import pytest -from .common import * +from .common import TrezorTest, generate_entropy from trezorlib import messages as proto from mnemonic import Mnemonic diff --git a/trezorlib/tests/device_tests/test_msg_resetdevice_t2.py b/trezorlib/tests/device_tests/test_msg_resetdevice_t2.py index 5fee646e15..823c69d5fd 100644 --- a/trezorlib/tests/device_tests/test_msg_resetdevice_t2.py +++ b/trezorlib/tests/device_tests/test_msg_resetdevice_t2.py @@ -17,8 +17,9 @@ # along with this library. If not, see . import time +import pytest -from .common import * +from .common import TrezorTest, generate_entropy from trezorlib import messages as proto from mnemonic import Mnemonic diff --git a/trezorlib/tests/device_tests/test_msg_signidentity.py b/trezorlib/tests/device_tests/test_msg_signidentity.py index 4d80d6477c..2985063f10 100644 --- a/trezorlib/tests/device_tests/test_msg_signidentity.py +++ b/trezorlib/tests/device_tests/test_msg_signidentity.py @@ -16,10 +16,11 @@ # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . -from __future__ import print_function import struct -from .common import * +from binascii import hexlify, unhexlify + +from .common import TrezorTest from trezorlib import messages as proto diff --git a/trezorlib/tests/device_tests/test_msg_signmessage.py b/trezorlib/tests/device_tests/test_msg_signmessage.py index aac02275af..592f0c15c3 100644 --- a/trezorlib/tests/device_tests/test_msg_signmessage.py +++ b/trezorlib/tests/device_tests/test_msg_signmessage.py @@ -15,8 +15,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +from binascii import hexlify -from .common import * +from .common import TrezorTest class TestMsgSignmessage(TrezorTest): diff --git a/trezorlib/tests/device_tests/test_msg_signmessage_segwit.py b/trezorlib/tests/device_tests/test_msg_signmessage_segwit.py index d46a9edf03..086d216750 100644 --- a/trezorlib/tests/device_tests/test_msg_signmessage_segwit.py +++ b/trezorlib/tests/device_tests/test_msg_signmessage_segwit.py @@ -15,8 +15,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +from binascii import hexlify -from .common import * +from .common import TrezorTest from trezorlib import messages as proto diff --git a/trezorlib/tests/device_tests/test_msg_signmessage_segwit_native.py b/trezorlib/tests/device_tests/test_msg_signmessage_segwit_native.py index b895c8f2e2..08e8629b7c 100644 --- a/trezorlib/tests/device_tests/test_msg_signmessage_segwit_native.py +++ b/trezorlib/tests/device_tests/test_msg_signmessage_segwit_native.py @@ -15,8 +15,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +from binascii import hexlify -from .common import * +from .common import TrezorTest from trezorlib import messages as proto diff --git a/trezorlib/tests/device_tests/test_msg_signtx_decred.py b/trezorlib/tests/device_tests/test_msg_signtx_decred.py index 445404f776..bc3c0c9957 100644 --- a/trezorlib/tests/device_tests/test_msg_signtx_decred.py +++ b/trezorlib/tests/device_tests/test_msg_signtx_decred.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . -from binascii import hexlify, unhexlify +from binascii import unhexlify import pytest from .common import TrezorTest diff --git a/trezorlib/tests/device_tests/test_msg_signtx_zcash.py b/trezorlib/tests/device_tests/test_msg_signtx_zcash.py index e4dac926e2..aec7a76ad2 100644 --- a/trezorlib/tests/device_tests/test_msg_signtx_zcash.py +++ b/trezorlib/tests/device_tests/test_msg_signtx_zcash.py @@ -15,12 +15,14 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +from binascii import unhexlify, hexlify +import pytest - -from .common import * +from .common import TrezorTest from trezorlib import coins from trezorlib import messages as proto +from trezorlib.tools import parse_path TxApiZcash = coins.tx_api["Zcash"] @@ -28,8 +30,7 @@ TxApiZcash = coins.tx_api["Zcash"] TXHASH_93373e = unhexlify('93373e63cc626c4a7d049ad775d6511bb5eba985f142db660c9b9f955c722f5c') -@pytest.mark.skip_t1 -@pytest.mark.skip_t2 +@pytest.mark.skip(reason="Broken until we have support for Zcash v3 transactions.") class TestMsgSigntxZcash(TrezorTest): def test_one_one_fee(self): @@ -39,7 +40,7 @@ class TestMsgSigntxZcash(TrezorTest): # input 0: 1.234567 TAZ inp1 = proto.TxInputType( - address_n=[2147483692, 2147483649, 2147483648, 0, 0], # tmQoJ3PTXgQLaRRZZYT6xk8XtjRbr2kCqwu + address_n=parse_path("m/Zcash Testnet/0h/0/0"), # tmQoJ3PTXgQLaRRZZYT6xk8XtjRbr2kCqwu # amount=123456700, prev_hash=TXHASH_93373e, prev_index=0, diff --git a/trezorlib/tests/device_tests/test_msg_verifymessage.py b/trezorlib/tests/device_tests/test_msg_verifymessage.py index ba51f4a58b..7c64670b0d 100644 --- a/trezorlib/tests/device_tests/test_msg_verifymessage.py +++ b/trezorlib/tests/device_tests/test_msg_verifymessage.py @@ -15,9 +15,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +from binascii import unhexlify -from .common import * -import base64 +from .common import TrezorTest class TestMsgVerifymessage(TrezorTest): diff --git a/trezorlib/tests/device_tests/test_msg_verifymessage_segwit.py b/trezorlib/tests/device_tests/test_msg_verifymessage_segwit.py index ba8cf46c2b..15c21b03b0 100644 --- a/trezorlib/tests/device_tests/test_msg_verifymessage_segwit.py +++ b/trezorlib/tests/device_tests/test_msg_verifymessage_segwit.py @@ -15,9 +15,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +from binascii import unhexlify -from .common import * -import base64 +from .common import TrezorTest class TestMsgVerifymessageSegwit(TrezorTest): diff --git a/trezorlib/tests/device_tests/test_msg_verifymessage_segwit_native.py b/trezorlib/tests/device_tests/test_msg_verifymessage_segwit_native.py index fa2beb084a..dbaa4bd107 100644 --- a/trezorlib/tests/device_tests/test_msg_verifymessage_segwit_native.py +++ b/trezorlib/tests/device_tests/test_msg_verifymessage_segwit_native.py @@ -15,9 +15,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +from binascii import unhexlify -from .common import * -import base64 +from .common import TrezorTest class TestMsgVerifymessageSegwitNative(TrezorTest): diff --git a/trezorlib/tests/device_tests/test_msg_wipedevice.py b/trezorlib/tests/device_tests/test_msg_wipedevice.py index a089de6825..2a5f259eb7 100644 --- a/trezorlib/tests/device_tests/test_msg_wipedevice.py +++ b/trezorlib/tests/device_tests/test_msg_wipedevice.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . -from .common import * +from .common import TrezorTest from trezorlib import messages as proto diff --git a/trezorlib/tests/device_tests/test_op_return.py b/trezorlib/tests/device_tests/test_op_return.py index e4a38bdc98..bfcc973e38 100644 --- a/trezorlib/tests/device_tests/test_op_return.py +++ b/trezorlib/tests/device_tests/test_op_return.py @@ -15,8 +15,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +from binascii import unhexlify, hexlify -from .common import * +from .common import TrezorTest from trezorlib import messages as proto from trezorlib.client import CallException diff --git a/trezorlib/tests/device_tests/test_protect_call.py b/trezorlib/tests/device_tests/test_protect_call.py index 3b7980e9b8..10fe06ee12 100644 --- a/trezorlib/tests/device_tests/test_protect_call.py +++ b/trezorlib/tests/device_tests/test_protect_call.py @@ -16,10 +16,10 @@ # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . -from __future__ import print_function - import time -from .common import * +import pytest + +from .common import TrezorTest from trezorlib import messages as proto from trezorlib.client import PinException, CallException diff --git a/trezorlib/tests/device_tests/test_protection_levels.py b/trezorlib/tests/device_tests/test_protection_levels.py index c3fa7418b6..ba944be418 100644 --- a/trezorlib/tests/device_tests/test_protection_levels.py +++ b/trezorlib/tests/device_tests/test_protection_levels.py @@ -15,8 +15,10 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +from binascii import unhexlify +import pytest -from .common import * +from .common import TrezorTest from trezorlib import messages as proto diff --git a/trezorlib/tests/device_tests/test_zerosig.py b/trezorlib/tests/device_tests/test_zerosig.py index 507ef7d719..5b65a1f181 100644 --- a/trezorlib/tests/device_tests/test_zerosig.py +++ b/trezorlib/tests/device_tests/test_zerosig.py @@ -15,12 +15,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +from binascii import unhexlify -from __future__ import print_function - -import sys -from .common import * - +from .common import TrezorTest from trezorlib import messages as proto