1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-15 10:58:09 +00:00
trezor-firmware/tests/common.py
slush cb594df790 Updated test structure to comply with latest changes.
test_basic.py passes succesfully, others will come soon...
2013-09-01 02:47:49 +02:00

27 lines
899 B
Python

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)
self.bitkey.load_device(
seed='beyond neighbor scratch swirl embarrass doll cause also stick softly physical nice',
pin='1234')
print "Setup finished"
print "--------------"
def tearDown(self):
self.bitkey.init_device()
self.debug_transport.close()
self.transport.close()