Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions tests/test_msg_bip85.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,26 @@

class TestMsgBip85(common.KeepKeyTest):

def test_bip85_12word_flow(self):
def setUp(self):
super().setUp()
self.requires_firmware("7.14.0")
self.requires_message("GetBip85Mnemonic")

def test_bip85_12word_flow(self):
"""12-word derivation: verify device goes through display flow and returns Success."""
self.setup_mnemonic_allallall()

resp = self.client.call(proto.GetBip85Mnemonic(word_count=12, index=0))
self.assertIsInstance(resp, proto.Success)

def test_bip85_24word_flow(self):
self.requires_firmware("7.14.0")
"""24-word derivation: verify display flow and Success."""
self.setup_mnemonic_allallall()

resp = self.client.call(proto.GetBip85Mnemonic(word_count=24, index=0))
self.assertIsInstance(resp, proto.Success)

def test_bip85_different_indices_different_flows(self):
self.requires_firmware("7.14.0")
"""Index 0 and index 1 must both succeed."""
self.setup_mnemonic_allallall()

Expand All @@ -43,7 +45,6 @@ def test_bip85_different_indices_different_flows(self):
self.assertIsInstance(resp, proto.Success)

def test_bip85_invalid_word_count(self):
self.requires_firmware("7.14.0")
"""Invalid word_count (15) must be rejected by firmware."""
self.setup_mnemonic_allallall()

Expand All @@ -53,15 +54,13 @@ def test_bip85_invalid_word_count(self):
self.assertIn('word_count', str(ctx.exception))

def test_bip85_18word_flow(self):
self.requires_firmware("7.14.0")
"""18-word derivation: verify the third word_count variant works."""
self.setup_mnemonic_allallall()

resp = self.client.call(proto.GetBip85Mnemonic(word_count=18, index=0))
self.assertIsInstance(resp, proto.Success)

def test_bip85_deterministic_flow(self):
self.requires_firmware("7.14.0")
"""Same parameters must produce identical results both times."""
self.setup_mnemonic_allallall()

Expand Down
Loading