From a31dba225e774e37e1d16de07676fa23ebb7b5d9 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Tue, 8 Nov 2016 21:34:52 +0100 Subject: [PATCH] test: add test for trezor.config.wipe --- tests/test_trezor.config.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/test_trezor.config.py b/tests/test_trezor.config.py index 03592516c..2ba52d49a 100644 --- a/tests/test_trezor.config.py +++ b/tests/test_trezor.config.py @@ -6,6 +6,20 @@ from trezor import config class TestConfig(unittest.TestCase): + def test_wipe(self): + config.wipe() + config.set(0, 0, b'hello') + config.set(1, 1, b'world') + v0 = config.get(0, 0) + v1 = config.get(1, 1) + self.assertEqual(v0, b'hello') + self.assertEqual(v1, b'world') + config.wipe() + v0 = config.get(0, 0) + v1 = config.get(1, 1) + self.assertIsNone(v0) + self.assertIsNone(v1) + def test_set_get(self): config.wipe() for _ in range(128):