You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/tests/test_pings.py

38 lines
1.2 KiB

import time
import unittest
import common
from trezorlib import messages_pb2 as proto
from trezorlib import types_pb2 as types
class TestPing(common.TrezorTest):
def test_ping(self):
res = self.client.ping('random data')
self.assertEqual(res, 'random data')
res = self.client.ping('random data', button_protection=True)
self.assertEqual(res, 'random data')
res = self.client.ping('random data', pin_protection=True)
self.assertEqual(res, 'random data')
res = self.client.ping('random data', passphrase_protection=True)
self.assertEqual(res, 'random data')
res = self.client.ping('random data', button_protection=True, pin_protection=True)
self.assertEqual(res, 'random data')
res = self.client.ping('random data', button_protection=True, passphrase_protection=True)
self.assertEqual(res, 'random data')
res = self.client.ping('random data', pin_protection=True, passphrase_protection=True)
self.assertEqual(res, 'random data')
res = self.client.ping('random data', button_protection=True, pin_protection=True, passphrase_protection=True)
self.assertEqual(res, 'random data')
if __name__ == '__main__':
unittest.main()