mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-20 05:18:08 +00:00
chore(tests): fix CI failures
Disable some tests of unsupported coins for TS3. [no changelog]
This commit is contained in:
parent
e073e619c9
commit
a351614e3a
@ -1,9 +1,10 @@
|
||||
from common import * # isort:skip
|
||||
|
||||
from trezor.crypto import bip39
|
||||
from trezor.enums import AmountUnit, OutputScriptType
|
||||
from trezor.enums.RequestType import TXFINISHED, TXINPUT, TXMETA, TXOUTPUT
|
||||
from trezor.messages import (
|
||||
if not utils.MODEL_IS_T2B1:
|
||||
from trezor.crypto import bip39
|
||||
from trezor.enums import AmountUnit, OutputScriptType
|
||||
from trezor.enums.RequestType import TXFINISHED, TXINPUT, TXMETA, TXOUTPUT
|
||||
from trezor.messages import (
|
||||
PrevInput,
|
||||
PrevOutput,
|
||||
PrevTx,
|
||||
@ -22,20 +23,22 @@ from trezor.messages import (
|
||||
TxRequest,
|
||||
TxRequestDetailsType,
|
||||
TxRequestSerializedType,
|
||||
)
|
||||
from trezor.utils import chunks
|
||||
)
|
||||
from trezor.utils import chunks
|
||||
|
||||
from apps.bitcoin.keychain import _get_schemas_for_coin
|
||||
from apps.bitcoin.sign_tx import decred, helpers
|
||||
from apps.common import coins
|
||||
from apps.common.keychain import Keychain
|
||||
from apps.bitcoin.keychain import _get_schemas_for_coin
|
||||
from apps.bitcoin.sign_tx import decred, helpers
|
||||
from apps.common import coins
|
||||
from apps.common.keychain import Keychain
|
||||
|
||||
EMPTY_SERIALIZED = TxRequestSerializedType(serialized_tx=bytearray())
|
||||
EMPTY_SERIALIZED = TxRequestSerializedType(serialized_tx=bytearray())
|
||||
|
||||
coin_decred = coins.by_name("Decred Testnet")
|
||||
coin_decred = coins.by_name("Decred Testnet")
|
||||
|
||||
ptx1 = PrevTx(version=1, lock_time=0, inputs_count=1, outputs_count=2, extra_data_len=0)
|
||||
pinp1 = PrevInput(
|
||||
ptx1 = PrevTx(
|
||||
version=1, lock_time=0, inputs_count=1, outputs_count=2, extra_data_len=0
|
||||
)
|
||||
pinp1 = PrevInput(
|
||||
script_sig=unhexlify(
|
||||
"47304402207d127d59a44187952d9d0de94ad34a19dd9a84beb124fd8a3fb439c862544d3202206618f321385c30bda96fb01ce03f70a269d78a301c0b0c2e3e3689dfae3f4733012102ae1f6b51086bd753f072f94eb8ffe6806d3570c088a3ede46c678b6ea47d1675"
|
||||
),
|
||||
@ -44,17 +47,17 @@ pinp1 = PrevInput(
|
||||
),
|
||||
prev_index=2,
|
||||
sequence=0xFFFF_FFFF,
|
||||
)
|
||||
pout1 = PrevOutput(
|
||||
)
|
||||
pout1 = PrevOutput(
|
||||
script_pubkey=unhexlify("76a914e4111051ae0349ab5589cf2b7e125c6da694a1a188ac"),
|
||||
amount=153_185_001,
|
||||
decred_script_version=0,
|
||||
)
|
||||
pout2 = PrevOutput(
|
||||
)
|
||||
pout2 = PrevOutput(
|
||||
script_pubkey=unhexlify("76a914dc1a98d791735eb9a8715a2a219c23680edcedad88ac"),
|
||||
amount=200_000_000,
|
||||
decred_script_version=0,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@unittest.skipUnless(not utils.BITCOIN_ONLY, "altcoin")
|
||||
@ -402,4 +405,5 @@ class TestSignTxDecred(unittest.TestCase):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if not utils.MODEL_IS_T2B1:
|
||||
unittest.main()
|
||||
|
@ -18,12 +18,17 @@ class TestCoins(unittest.TestCase):
|
||||
@unittest.skipUnless(not utils.BITCOIN_ONLY, "altcoin")
|
||||
def test_altcoins(self):
|
||||
ref = [
|
||||
("NMC", "Namecoin", 52),
|
||||
("LTC", "Litecoin", 48),
|
||||
("DASH", "Dash", 76),
|
||||
("ZEC", "Zcash", 7352),
|
||||
("TAZ", "Zcash Testnet", 7461),
|
||||
]
|
||||
if not utils.MODEL_IS_T2B1:
|
||||
ref.extend(
|
||||
[
|
||||
("NMC", "Namecoin", 52),
|
||||
("DASH", "Dash", 76),
|
||||
]
|
||||
)
|
||||
for s, n, a in ref:
|
||||
c = coins.by_name(n)
|
||||
self.assertEqual(c.address_type, a)
|
||||
|
@ -319,4 +319,5 @@ class TestNemHDNode(unittest.TestCase):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if not utils.MODEL_IS_T2B1:
|
||||
unittest.main()
|
||||
|
Loading…
Reference in New Issue
Block a user