mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-05 13:01:12 +00:00
38 lines
1.2 KiB
Python
38 lines
1.2 KiB
Python
|
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()
|