From e2aca677c087f5945538e62efeb6512621542a22 Mon Sep 17 00:00:00 2001 From: slush0 Date: Fri, 21 Feb 2014 01:48:50 +0100 Subject: [PATCH] WipeDevice test --- tests/test_device_wipe.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/test_device_wipe.py diff --git a/tests/test_device_wipe.py b/tests/test_device_wipe.py new file mode 100644 index 000000000..0f9c70ade --- /dev/null +++ b/tests/test_device_wipe.py @@ -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()