mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-24 23:38:09 +00:00
test: add test for trezor.config.wipe
This commit is contained in:
parent
2dc9d6ac4e
commit
a31dba225e
@ -6,6 +6,20 @@ from trezor import config
|
|||||||
|
|
||||||
class TestConfig(unittest.TestCase):
|
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):
|
def test_set_get(self):
|
||||||
config.wipe()
|
config.wipe()
|
||||||
for _ in range(128):
|
for _ in range(128):
|
||||||
|
Loading…
Reference in New Issue
Block a user