device_tests: use skip_t1 and skip_t2 markers

pull/25/head
Pavol Rusnak 7 years ago
parent 2c00526d23
commit 41b75c5655
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
from trezorlib import messages

@ -18,7 +18,6 @@
from __future__ import print_function
import unittest
from . import common
import time

@ -16,13 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import pytest
import hashlib
from trezorlib import ed25519raw, ed25519cosi
@pytest.mark.skip_t2
class TestCosi(common.TrezorTest):
def test_cosi_commit(self):

@ -16,12 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import pytest
from trezorlib import messages as proto
@pytest.mark.skip_t2
class TestDebuglink(common.TrezorTest):
def test_layout(self):

@ -16,12 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import pytest
from trezorlib import messages as proto
@pytest.mark.skip_t2
class TestMsgApplysettings(common.TrezorTest):
def test_apply_settings(self):

@ -16,12 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import pytest
from trezorlib import messages as proto
@pytest.mark.skip_t2
class TestMsgChangepin(common.TrezorTest):
def test_set_pin(self):

@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import binascii

@ -16,12 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import pytest
from trezorlib import messages as proto
@pytest.mark.skip_t2
class TestMsgClearsession(common.TrezorTest):
def test_clearsession(self):

@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import binascii

@ -15,11 +15,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import pytest
import binascii
@pytest.mark.skip_t2
class TestMsgEthereumSignmessage(common.TrezorTest):
def test_sign(self):

@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import pytest
import binascii
@pytest.mark.skip_t2
class TestMsgEthereumSigntx(common.TrezorTest):
def test_ethereum_signtx_nodata(self):

@ -15,11 +15,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import pytest
import binascii
@pytest.mark.skip_t2
class TestMsgEthereumVerifymessage(common.TrezorTest):
def test_verify(self):

@ -17,7 +17,6 @@
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import pytest
import unittest
from . import common
from trezorlib import messages as proto
import trezorlib.ckd_public as bip32
@ -51,7 +50,7 @@ class TestMsgGetaddress(common.TrezorTest):
self.assertEqual(self.client.get_address('Bcash', self.client.expand_path("44'/145'/0'/0/1")), '1LRspCZNFJcbuNKQkXgHMDucctFRQya5a3')
self.assertEqual(self.client.get_address('Bcash', self.client.expand_path("44'/145'/0'/1/0")), '1HADRPJpgqBzThepERpVXNi6qRgiLQRNoE')
@pytest.mark.multisig
@pytest.mark.skip_t2
def test_bch_multisig(self):
self.setup_mnemonic_allallall()
xpubs = []

@ -1,4 +1,20 @@
import unittest
# This file is part of the TREZOR project.
#
# Copyright (C) 2016-2017 Pavol Rusnak <stick@satoshilabs.com>
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
from . import common
import trezorlib.ckd_public as bip32
from trezorlib import messages as proto

@ -1,4 +1,20 @@
import unittest
# This file is part of the TREZOR project.
#
# Copyright (C) 2016-2017 Pavol Rusnak <stick@satoshilabs.com>
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
from . import common
import trezorlib.ckd_public as bip32
from trezorlib import messages as proto

@ -16,12 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import trezorlib.ckd_public as bip32
import pytest
from trezorlib import messages as proto
@pytest.mark.skip_t2
class TestMsgGetaddressShow(common.TrezorTest):
def test_show(self):

@ -18,7 +18,6 @@
from __future__ import print_function
import unittest
import math
from . import common

@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import trezorlib.ckd_public as bip32

@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common

@ -16,10 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import pytest
@pytest.mark.skip_t2
class TestDeviceLoadXprv(common.TrezorTest):
def test_load_device_xprv_1(self):

@ -15,11 +15,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import pytest
import binascii
@pytest.mark.skip_t2
class TestMsgNEMGetaddress(common.TrezorTest):
def test_nem_getaddress(self):

@ -15,9 +15,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import binascii
import pytest
from trezorlib import messages as proto
@ -32,6 +32,7 @@ SIGNATURE_TESTNET_XEM_AS_MOSAIC = binascii.unhexlify(
)
@pytest.mark.skip_t2
class TestMsgNEMSigntx(common.TrezorTest):
def test_nem_signtx_simple(self):

@ -16,12 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import pytest
from trezorlib import messages as proto
@pytest.mark.skip_t2
class TestMsgPing(common.TrezorTest):
def test_ping(self):

@ -18,12 +18,12 @@
from __future__ import print_function
import unittest
from . import common
import pytest
from trezorlib import messages as proto
@pytest.mark.skip_t2
class TestMsgRecoverydevice(common.TrezorTest):
def test_pin_passphrase(self):

@ -18,12 +18,12 @@
from __future__ import print_function
import unittest
from . import common
import pytest
from trezorlib import messages as proto
@pytest.mark.skip_t2
class TestMsgRecoverydeviceDryrun(common.TrezorTest):
def recovery_loop(self, mnemonic, result):

@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
from trezorlib import messages as proto

@ -16,13 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import pytest
from trezorlib import messages as proto
from mnemonic import Mnemonic
@pytest.mark.skip_t2
class TestMsgResetDeviceSkipbackup(common.TrezorTest):
def test_reset_device_skip_backup(self):

@ -18,7 +18,6 @@
from __future__ import print_function
import unittest
import binascii
import hashlib
import struct

@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import binascii

@ -16,13 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import binascii
import pytest
from trezorlib import messages as proto
@pytest.mark.skip_t2
class TestMsgSignmessageSegwit(common.TrezorTest):
def test_sign(self):

@ -16,13 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import binascii
import pytest
from trezorlib import messages as proto
@pytest.mark.skip_t2
class TestMsgSignmessageSegwitNative(common.TrezorTest):
def test_sign(self):

@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import binascii
@ -356,7 +355,7 @@ class TestMsgSigntx(common.TrezorTest):
def test_lots_of_inputs(self):
self.setup_mnemonic_nopin_nopassphrase()
# Tests if device implements serialization of len(inputs) correctly
# tx 4a7b7e0403ae5607e473949cfa03f09f2cd8b0f404bf99ce10b7303d86280bf7 : 100 UTXO for spending for unittests
# tx 4a7b7e0403ae5607e473949cfa03f09f2cd8b0f404bf99ce10b7303d86280bf7 : 100 UTXO for spending for unit tests
inputs = []
for i in range(100):
inputs.append( proto.TxInputType(address_n=[4], # 1NwN6UduuVkJi6sw3gSiKZaCY5rHgVXC2h

@ -15,10 +15,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import binascii
import pytest
from trezorlib import messages as proto
from trezorlib.tx_api import TxApiInsight
from trezorlib.ckd_public import deserialize
@ -27,6 +26,7 @@ from trezorlib.client import CallException
TxApiBitcoinCash = TxApiInsight(network='insight_bch', url='https://bch-bitcore2.trezor.io/api/')
@pytest.mark.skip_t2
class TestMsgSigntxBch(common.TrezorTest):
def test_send_bch_change(self):

@ -15,9 +15,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import binascii
import pytest
from trezorlib import messages as proto
from trezorlib.tx_api import TxApiDecredTestnet
@ -26,6 +26,8 @@ from trezorlib.tx_api import TxApiDecredTestnet
TXHASH_e16248 = binascii.unhexlify("e16248f0b39a0a0c0e53d6f2f84c2a944f0d50e017a82701e8e02e46e979d5ed")
@pytest.mark.skip_t1
@pytest.mark.skip_t2
class TestMsgSigntxDecred(common.TrezorTest):
def test_send_decred(self):

@ -15,7 +15,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import binascii

@ -15,7 +15,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import binascii

@ -16,11 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
'''
import unittest
from . import common
import binascii
import pytest
from trezorlib import messages as proto
from trezorlib.tx_api import TxApiZcash
@ -28,6 +27,8 @@ from trezorlib.tx_api import TxApiZcash
TXHASH_93373e = binascii.unhexlify('93373e63cc626c4a7d049ad775d6511bb5eba985f142db660c9b9f955c722f5c')
@pytest.mark.skip_t1
@pytest.mark.skip_t2
class TestMsgSigntxZcash(common.TrezorTest):
def test_one_one_fee(self):
@ -72,4 +73,3 @@ class TestMsgSigntxZcash(common.TrezorTest):
# Accepted by network: tx dcc2a10894e0e8a785c2afd4de2d958207329b9acc2b987fd768a09c5efc4547
self.assertEqual(binascii.hexlify(serialized_tx), b'01000000015c2f725c959f9b0c66db42f185a9ebb51b51d675d79a047d4a6c62cc633e3793000000006a4730440220670b2b63d749a7038f9aea6ddf0302fe63bdcad93dafa4a89a1f0e7300ae2484022002c50af43fd867490cea0c527273c5828ff1b9a5115678f155a1830737cf29390121030e669acac1f280d1ddf441cd2ba5e97417bf2689e4bbec86df4f831bf9f7ffd0ffffffff0128c55b07000000001976a9145b157a678a10021243307e4bb58f36375aa80e1088ac00000000')
'''

@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import binascii
import base64

@ -16,12 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import binascii
import base64
import pytest
@pytest.mark.skip_t2
class TestMsgVerifymessageSegwit(common.TrezorTest):
def test_message_long(self):

@ -16,12 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import binascii
import base64
import pytest
@pytest.mark.skip_t2
class TestMsgVerifymessageSegwitNative(common.TrezorTest):
def test_message_long(self):

@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
from trezorlib import messages as proto

@ -18,10 +18,9 @@
from __future__ import print_function
import unittest
from . import common
import binascii
import pytest
from trezorlib import messages as proto
import trezorlib.ckd_public as bip32
from trezorlib.client import CallException
@ -36,6 +35,7 @@ TXHASH_c6091a = binascii.unhexlify('c6091adf4c0c23982a35899a6e58ae11e703eacd7954
#
@pytest.mark.skip_t2
class TestMultisig(common.TrezorTest):
def test_2_of_3(self):

@ -16,15 +16,15 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import binascii
import pytest
from trezorlib import messages as proto
import trezorlib.ckd_public as bip32
from trezorlib import tx_api
@pytest.mark.skip_t2
class TestMultisigChange(common.TrezorTest):
def setUp(self):

@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
import binascii
from . import common

@ -19,15 +19,15 @@
from __future__ import print_function
import time
import unittest
from . import common
import pytest
from trezorlib import messages as proto
from trezorlib.client import PinException, CallException
# FIXME TODO Add passphrase tests
@pytest.mark.skip_t2
class TestProtectCall(common.TrezorTest):
def _some_protected_call(self, button, pin, passphrase):

@ -16,16 +16,16 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import unittest
from . import common
import binascii
import pytest
from trezorlib import messages as proto
TXHASH_d5f65e = binascii.unhexlify('d5f65ee80147b4bcc70b75e4bbf2d7382021b871bd8867ef8fa525ef50864882')
@pytest.mark.skip_t2
class TestProtectionLevels(common.TrezorTest):
def test_initialize(self):

@ -18,7 +18,6 @@
from __future__ import print_function
import unittest
import binascii
import sys
from . import common

Loading…
Cancel
Save