1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-26 17:38:39 +00:00
trezor-firmware/tests/common.py

33 lines
1.2 KiB
Python
Raw Normal View History

import unittest
import config
2013-09-13 03:28:56 +00:00
from trezorlib.client import TrezorClient
from trezorlib.debuglink import DebugLink
from trezorlib import proto
2013-09-13 03:28:56 +00:00
class TrezorTest(unittest.TestCase):
def setUp(self):
self.debug_transport = config.DEBUG_TRANSPORT(*config.DEBUG_TRANSPORT_ARGS)
self.transport = config.TRANSPORT(*config.TRANSPORT_ARGS)
2013-09-13 03:28:56 +00:00
self.client = TrezorClient(self.transport, DebugLink(self.debug_transport), debug=True)
self.mnemonic1 = 'juice enrich pool orbit brick prevent system chronic people industry insane private'
self.mnemonic2 = 'bark depend buffalo library lonely syrup exact trip kitten yellow arch into damage phone toy wild color soon suit move opinion type replace donate'
2013-09-13 03:28:56 +00:00
self.pin1 = '1234'
self.pin2 = '43211'
self.client.setup_debuglink(button=True, pin_correct=True)
2013-09-13 03:28:56 +00:00
self.client.load_device(
seed=self.mnemonic1,
pin=self.pin1)
self.client.apply_settings(label='unit testing', coin_shortcut='BTC', language='english')
print "Setup finished"
print "--------------"
def tearDown(self):
self.debug_transport.close()
self.transport.close()