test: ensure seed entry retrieval omits phrases

This commit is contained in:
thePR0M3TH3AN
2025-07-07 11:10:07 -04:00
parent 543e537f34
commit dbff30619a

View File

@@ -34,6 +34,29 @@ def test_seed_phrase_determinism():
entry12 = entry_mgr.retrieve_entry(idx_12) entry12 = entry_mgr.retrieve_entry(idx_12)
entry24 = entry_mgr.retrieve_entry(idx_24) entry24 = entry_mgr.retrieve_entry(idx_24)
assert entry12 == {
"type": "seed",
"kind": "seed",
"index": idx_12,
"label": "seed12",
"word_count": 12,
"notes": "",
"archived": False,
}
assert entry24 == {
"type": "seed",
"kind": "seed",
"index": idx_24,
"label": "seed24",
"word_count": 24,
"notes": "",
"archived": False,
}
assert phrase12_a not in entry12.values()
assert phrase24_a not in entry24.values()
seed_bytes = Bip39SeedGenerator(TEST_SEED).Generate() seed_bytes = Bip39SeedGenerator(TEST_SEED).Generate()
bip85 = BIP85(seed_bytes) bip85 = BIP85(seed_bytes)
expected12 = derive_seed_phrase(bip85, idx_12, 12) expected12 = derive_seed_phrase(bip85, idx_12, 12)