1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-29 19:08:12 +00:00
trezor-firmware/tests/common.py

27 lines
957 B
Python
Raw Normal View History

import unittest
import config
from bitkeylib.client import BitkeyClient
from bitkeylib.debuglink import DebugLink
from bitkeylib import proto
class BitkeyTest(unittest.TestCase):
def setUp(self):
self.debug_transport = config.DEBUG_TRANSPORT(*config.DEBUG_TRANSPORT_ARGS)
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.load_device(algo=proto.ELECTRUM,
seed='beyond neighbor scratch swirl embarrass doll cause also stick softly physical nice',
otp=True, pin='1234', spv=True)
print "Setup finished"
print "--------------"
def tearDown(self):
2013-04-05 15:13:29 +00:00
self.bitkey.init_device()
self.debug_transport.close()
self.transport.close()