1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-13 19:18:56 +00:00

WipeDevice test

This commit is contained in:
slush0 2014-02-21 01:48:50 +01:00
parent 56a9a4b384
commit e2aca677c0

25
tests/test_device_wipe.py Normal file
View 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()