set TX API in tests/common.py
This commit is contained in:
parent
60c608276e
commit
e272ce4d14
|
@ -10,6 +10,7 @@ class TrezorTest(unittest.TestCase):
|
||||||
self.transport = config.TRANSPORT(*config.TRANSPORT_ARGS, **config.TRANSPORT_KWARGS)
|
self.transport = config.TRANSPORT(*config.TRANSPORT_ARGS, **config.TRANSPORT_KWARGS)
|
||||||
self.client = TrezorDebugClient(self.transport)
|
self.client = TrezorDebugClient(self.transport)
|
||||||
self.client.set_debuglink(self.debug_transport)
|
self.client.set_debuglink(self.debug_transport)
|
||||||
|
self.client.set_tx_api(TXAPIBitcoin())
|
||||||
# self.client.set_buttonwait(3)
|
# self.client.set_buttonwait(3)
|
||||||
|
|
||||||
# 1 2 3 4 5 6 7 8 9 10 11 12
|
# 1 2 3 4 5 6 7 8 9 10 11 12
|
||||||
|
|
|
@ -6,7 +6,7 @@ import itertools
|
||||||
import trezorlib.messages_pb2 as proto
|
import trezorlib.messages_pb2 as proto
|
||||||
import trezorlib.types_pb2 as proto_types
|
import trezorlib.types_pb2 as proto_types
|
||||||
from trezorlib.client import CallException
|
from trezorlib.client import CallException
|
||||||
from trezorlib.tx_api import TXAPITestnet, TXAPIBitcoin
|
from trezorlib.tx_api import TXAPITestnet
|
||||||
|
|
||||||
class TestMsgSigntx(common.TrezorTest):
|
class TestMsgSigntx(common.TrezorTest):
|
||||||
def test_one_one_fee(self):
|
def test_one_one_fee(self):
|
||||||
|
@ -476,7 +476,6 @@ class TestMsgSigntx(common.TrezorTest):
|
||||||
)
|
)
|
||||||
|
|
||||||
with self.client:
|
with self.client:
|
||||||
self.client.set_tx_api(TXAPIBitcoin())
|
|
||||||
self.client.set_expected_responses([
|
self.client.set_expected_responses([
|
||||||
proto.TxRequest(request_type=proto_types.TXINPUT, details=proto_types.TxRequestDetailsType(request_index=0)),
|
proto.TxRequest(request_type=proto_types.TXINPUT, details=proto_types.TxRequestDetailsType(request_index=0)),
|
||||||
proto.TxRequest(request_type=proto_types.TXMETA, details=proto_types.TxRequestDetailsType(tx_hash=binascii.unhexlify("54aa5680dea781f45ebb536e53dffc526d68c0eb5c00547e323b2c32382dfba3"))),
|
proto.TxRequest(request_type=proto_types.TXMETA, details=proto_types.TxRequestDetailsType(tx_hash=binascii.unhexlify("54aa5680dea781f45ebb536e53dffc526d68c0eb5c00547e323b2c32382dfba3"))),
|
||||||
|
|
|
@ -8,7 +8,7 @@ import binascii
|
||||||
import trezorlib.messages_pb2 as proto
|
import trezorlib.messages_pb2 as proto
|
||||||
import trezorlib.types_pb2 as proto_types
|
import trezorlib.types_pb2 as proto_types
|
||||||
from trezorlib.client import CallException
|
from trezorlib.client import CallException
|
||||||
from trezorlib.tx_api import TXAPITestnet, TXAPIBitcoin
|
from trezorlib.tx_api import TXAPITestnet
|
||||||
|
|
||||||
class TestMsgSimplesigntx(common.TrezorTest):
|
class TestMsgSimplesigntx(common.TrezorTest):
|
||||||
|
|
||||||
|
@ -320,7 +320,6 @@ class TestMsgSimplesigntx(common.TrezorTest):
|
||||||
)
|
)
|
||||||
|
|
||||||
with self.client:
|
with self.client:
|
||||||
self.client.set_tx_api(TXAPIBitcoin())
|
|
||||||
self.client.set_expected_responses([proto.ButtonRequest(code=proto_types.ButtonRequest_ConfirmOutput),
|
self.client.set_expected_responses([proto.ButtonRequest(code=proto_types.ButtonRequest_ConfirmOutput),
|
||||||
proto.ButtonRequest(code=proto_types.ButtonRequest_SignTx),
|
proto.ButtonRequest(code=proto_types.ButtonRequest_SignTx),
|
||||||
proto.TxRequest(request_type=proto_types.TXFINISHED)])
|
proto.TxRequest(request_type=proto_types.TXFINISHED)])
|
||||||
|
|
|
@ -6,7 +6,7 @@ import itertools
|
||||||
import trezorlib.messages_pb2 as proto
|
import trezorlib.messages_pb2 as proto
|
||||||
import trezorlib.types_pb2 as proto_types
|
import trezorlib.types_pb2 as proto_types
|
||||||
from trezorlib.client import CallException
|
from trezorlib.client import CallException
|
||||||
from trezorlib.tx_api import TXAPITestnet, TXAPIBitcoin
|
from trezorlib.tx_api import TXAPITestnet
|
||||||
|
|
||||||
class TestOpReturn(common.TrezorTest):
|
class TestOpReturn(common.TrezorTest):
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue