mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
core/tests/slip39: Add tests for invalid threshold.
This commit is contained in:
parent
0248671438
commit
ff594753e0
@ -77,6 +77,18 @@ class TestCryptoSlip39(unittest.TestCase):
|
||||
with self.assertRaises(ValueError):
|
||||
slip39.generate_mnemonics(3, [(3, 5), (2, 5)], self.MS)
|
||||
|
||||
# Invalid group threshold.
|
||||
with self.assertRaises(ValueError):
|
||||
slip39.generate_mnemonics(0, [(3, 5), (2, 5)], self.MS)
|
||||
|
||||
# Member threshold exceeds number of members.
|
||||
with self.assertRaises(ValueError):
|
||||
slip39.generate_mnemonics(2, [(3, 2), (2, 5)], self.MS)
|
||||
|
||||
# Invalid member threshold.
|
||||
with self.assertRaises(ValueError):
|
||||
slip39.generate_mnemonics(2, [(0, 2), (2, 5)], self.MS)
|
||||
|
||||
# Group with multiple members and threshold 1.
|
||||
with self.assertRaises(ValueError):
|
||||
slip39.generate_mnemonics(2, [(3, 5), (1, 3), (2, 5)], self.MS)
|
||||
|
Loading…
Reference in New Issue
Block a user