mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-27 01:48:17 +00:00
WipeDevice test
This commit is contained in:
parent
56a9a4b384
commit
e2aca677c0
25
tests/test_device_wipe.py
Normal file
25
tests/test_device_wipe.py
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import unittest
|
||||||
|
import common
|
||||||
|
|
||||||
|
from trezorlib import messages_pb2 as proto
|
||||||
|
|
||||||
|
class TestDeviceWipe(common.TrezorTest):
|
||||||
|
def test_wipe_device(self):
|
||||||
|
self.setup_mnemonic_pin_passphrase()
|
||||||
|
features = self.client.call_raw(proto.Initialize())
|
||||||
|
|
||||||
|
self.assertEqual(features.initialized, True)
|
||||||
|
self.assertEqual(features.pin_protection, True)
|
||||||
|
self.assertEqual(features.passphrase_protection, True)
|
||||||
|
device_id = features.device_id
|
||||||
|
|
||||||
|
self.client.wipe_device()
|
||||||
|
features = self.client.call_raw(proto.Initialize())
|
||||||
|
|
||||||
|
self.assertEqual(features.initialized, False)
|
||||||
|
self.assertEqual(features.pin_protection, False)
|
||||||
|
self.assertEqual(features.passphrase_protection, False)
|
||||||
|
self.assertNotEqual(features.device_id, device_id)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
Loading…
Reference in New Issue
Block a user