Skip to content

Commit 081fad0

Browse files
committed
test(reset): collect dice backup words once per logical group
1 parent f4040d2 commit 081fad0

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

tests/test_msg_resetdevice.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,17 @@ def test_reset_device_dice(self):
235235

236236
mnemonic = []
237237
while isinstance(resp, proto.ButtonRequest):
238-
mnemonic.append(self.client.debug.read_reset_word())
238+
words = self.client.debug.read_reset_word()
239+
# Debug subpages repeat their logical word group, as in the
240+
# normal reset collector above. Keep the final seed assertion.
241+
if not mnemonic or mnemonic[-1] != words:
242+
mnemonic.append(words)
239243
self.client.debug.press_yes()
240244
resp = self.client.call_raw(proto.ButtonAck())
241245

242246
self.assertIsInstance(resp, proto.Success)
243247
self.assertEqual(' '.join(mnemonic), expected_mnemonic)
248+
self.assertEqual(strength // 32 * 3, len(' '.join(mnemonic).split()))
244249

245250
def test_reset_reentry_disarms_entropy_ack(self):
246251
"""An abandoned reset must never leave EntropyAck armed.

0 commit comments

Comments
 (0)