mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-29 19:08:12 +00:00
Updated test structure to comply with latest changes.
test_basic.py passes succesfully, others will come soon...
This commit is contained in:
parent
5b214bbed2
commit
cb594df790
@ -11,11 +11,11 @@ class BitkeyTest(unittest.TestCase):
|
|||||||
self.transport = config.TRANSPORT(*config.TRANSPORT_ARGS)
|
self.transport = config.TRANSPORT(*config.TRANSPORT_ARGS)
|
||||||
self.bitkey = BitkeyClient(self.transport, DebugLink(self.debug_transport), debug=True)
|
self.bitkey = BitkeyClient(self.transport, DebugLink(self.debug_transport), debug=True)
|
||||||
|
|
||||||
self.bitkey.setup_debuglink(button=True, pin_correct=True, otp_correct=True)
|
self.bitkey.setup_debuglink(button=True, pin_correct=True)
|
||||||
|
|
||||||
self.bitkey.load_device(algo=proto.ELECTRUM,
|
self.bitkey.load_device(
|
||||||
seed='beyond neighbor scratch swirl embarrass doll cause also stick softly physical nice',
|
seed='beyond neighbor scratch swirl embarrass doll cause also stick softly physical nice',
|
||||||
otp=True, pin='1234', spv=True)
|
pin='1234')
|
||||||
|
|
||||||
print "Setup finished"
|
print "Setup finished"
|
||||||
print "--------------"
|
print "--------------"
|
||||||
|
@ -6,7 +6,7 @@ from bitkeylib.transport_hid import HidTransport
|
|||||||
from bitkeylib.transport_socket import SocketTransportClient
|
from bitkeylib.transport_socket import SocketTransportClient
|
||||||
|
|
||||||
TRANSPORT = PipeTransport
|
TRANSPORT = PipeTransport
|
||||||
TRANSPORT_ARGS = ('../../bitkey-python/bitkey.pipe', False)
|
TRANSPORT_ARGS = ('../../trezor-emu/pipe.trezor', False)
|
||||||
|
|
||||||
#TRANSPORT = HidTransport
|
#TRANSPORT = HidTransport
|
||||||
#TRANSPORT_ARGS = ('0x10c4:0xea80:000868D3', False)
|
#TRANSPORT_ARGS = ('0x10c4:0xea80:000868D3', False)
|
||||||
@ -15,7 +15,7 @@ TRANSPORT_ARGS = ('../../bitkey-python/bitkey.pipe', False)
|
|||||||
#TRANSPORT_ARGS = ('trezor.dyn:3000', False)
|
#TRANSPORT_ARGS = ('trezor.dyn:3000', False)
|
||||||
|
|
||||||
DEBUG_TRANSPORT = PipeTransport
|
DEBUG_TRANSPORT = PipeTransport
|
||||||
DEBUG_TRANSPORT_ARGS = ('../../bitkey-python/bitkey_debug.pipe', False)
|
DEBUG_TRANSPORT_ARGS = ('../../trezor-emu/pipe.trezor_debug', False)
|
||||||
|
|
||||||
#DEBUG_TRANSPORT = SocketTransportClient
|
#DEBUG_TRANSPORT = SocketTransportClient
|
||||||
#DEBUG_TRANSPORT_ARGS = ('trezor.dyn:2000', False)
|
#DEBUG_TRANSPORT_ARGS = ('trezor.dyn:2000', False)
|
||||||
|
@ -14,7 +14,7 @@ from bitkeylib import proto
|
|||||||
|
|
||||||
class TestBasic(common.BitkeyTest):
|
class TestBasic(common.BitkeyTest):
|
||||||
def test_features(self):
|
def test_features(self):
|
||||||
features = self.bitkey.call(proto.Initialize(session_id=self.bitkey.session_id))
|
features = self.bitkey.call(proto.Initialize())
|
||||||
|
|
||||||
# Result is the same as reported by BitkeyClient class
|
# Result is the same as reported by BitkeyClient class
|
||||||
self.assertEqual(features, self.bitkey.features)
|
self.assertEqual(features, self.bitkey.features)
|
||||||
|
Loading…
Reference in New Issue
Block a user