Assert the derived result for another key's address path instead of an error

This commit is contained in:
ai-bot committed 2026-10-04 12:24:33 +00:00
1 parent 093e5892db
commit 1dc5ebfc1e
1 file changed
+8 -5
+8 -5
View File
@@ -529,14 +529,17 @@ class ValidationTests(unittest.TestCase):
validate(payload)
def test_the_path_of_another_key_does_not_match(self):
# The comparison uses the selected key's own path (section 25.1).
with self.assertRaises(ValidationError):
validate(mismatch_payload(2, ADDRESS_PATH, RENAMED_KEYS), RENAMED_KEYS)
# The comparison uses the selected key's own path (section 25.1), so the
# path of another key is a mismatch for this one.
result = validate(mismatch_payload(2, ADDRESS_PATH, RENAMED_KEYS), RENAMED_KEYS)
result = validate(
self.assertEqual(result["key_check"]["address_path"], ADDRESS_PATH)
self.assertEqual(result["key_check"]["address_path_verified"], "PROBLEM")
own_path = validate(
mismatch_payload(2, "m/48'/1'/0'/2'", RENAMED_KEYS), RENAMED_KEYS
)
self.assertEqual(result["key_check"]["address_path_verified"], "OK")
self.assertEqual(own_path["key_check"]["address_path_verified"], "OK")
def test_a_submitted_verification_result_is_ignored(self):
# The client never sends the result, and the server overrules it anyway