set TX API in tests/common.py

This commit is contained in:
Pavol Rusnak 2015-07-22 17:32:28 +02:00
parent 60c608276e
commit e272ce4d14
4 changed files with 4 additions and 5 deletions

View File

@ -10,6 +10,7 @@ class TrezorTest(unittest.TestCase):
self.transport = config.TRANSPORT(*config.TRANSPORT_ARGS, **config.TRANSPORT_KWARGS)
self.client = TrezorDebugClient(self.transport)
self.client.set_debuglink(self.debug_transport)
self.client.set_tx_api(TXAPIBitcoin())
# self.client.set_buttonwait(3)
# 1 2 3 4 5 6 7 8 9 10 11 12

View File

@ -6,7 +6,7 @@ import itertools
import trezorlib.messages_pb2 as proto
import trezorlib.types_pb2 as proto_types
from trezorlib.client import CallException
from trezorlib.tx_api import TXAPITestnet, TXAPIBitcoin
from trezorlib.tx_api import TXAPITestnet
class TestMsgSigntx(common.TrezorTest):
def test_one_one_fee(self):
@ -476,7 +476,6 @@ class TestMsgSigntx(common.TrezorTest):
)
with self.client:
self.client.set_tx_api(TXAPIBitcoin())
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.TXMETA, details=proto_types.TxRequestDetailsType(tx_hash=binascii.unhexlify("54aa5680dea781f45ebb536e53dffc526d68c0eb5c00547e323b2c32382dfba3"))),

View File

@ -8,7 +8,7 @@ import binascii
import trezorlib.messages_pb2 as proto
import trezorlib.types_pb2 as proto_types
from trezorlib.client import CallException
from trezorlib.tx_api import TXAPITestnet, TXAPIBitcoin
from trezorlib.tx_api import TXAPITestnet
class TestMsgSimplesigntx(common.TrezorTest):
@ -320,7 +320,6 @@ class TestMsgSimplesigntx(common.TrezorTest):
)
with self.client:
self.client.set_tx_api(TXAPIBitcoin())
self.client.set_expected_responses([proto.ButtonRequest(code=proto_types.ButtonRequest_ConfirmOutput),
proto.ButtonRequest(code=proto_types.ButtonRequest_SignTx),
proto.TxRequest(request_type=proto_types.TXFINISHED)])

View File

@ -6,7 +6,7 @@ import itertools
import trezorlib.messages_pb2 as proto
import trezorlib.types_pb2 as proto_types
from trezorlib.client import CallException
from trezorlib.tx_api import TXAPITestnet, TXAPIBitcoin
from trezorlib.tx_api import TXAPITestnet
class TestOpReturn(common.TrezorTest):