1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 15:38:11 +00:00

Updated test structure to comply with latest changes.

test_basic.py passes succesfully, others will come soon...
This commit is contained in:
slush 2013-09-01 02:47:49 +02:00
parent 5b214bbed2
commit cb594df790
3 changed files with 6 additions and 6 deletions

View File

@ -11,11 +11,11 @@ class BitkeyTest(unittest.TestCase):
self.transport = config.TRANSPORT(*config.TRANSPORT_ARGS)
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',
otp=True, pin='1234', spv=True)
pin='1234')
print "Setup finished"
print "--------------"

View File

@ -6,7 +6,7 @@ from bitkeylib.transport_hid import HidTransport
from bitkeylib.transport_socket import SocketTransportClient
TRANSPORT = PipeTransport
TRANSPORT_ARGS = ('../../bitkey-python/bitkey.pipe', False)
TRANSPORT_ARGS = ('../../trezor-emu/pipe.trezor', False)
#TRANSPORT = HidTransport
#TRANSPORT_ARGS = ('0x10c4:0xea80:000868D3', False)
@ -15,7 +15,7 @@ TRANSPORT_ARGS = ('../../bitkey-python/bitkey.pipe', False)
#TRANSPORT_ARGS = ('trezor.dyn:3000', False)
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_ARGS = ('trezor.dyn:2000', False)

View File

@ -14,7 +14,7 @@ from bitkeylib import proto
class TestBasic(common.BitkeyTest):
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
self.assertEqual(features, self.bitkey.features)