test(core): use equality for passphrase click tests
What changed, and why it matters
This commit only changes automated test code for the Trezor hardware wallet. It makes passphrase display checks stricter in a test file (using exact equality instead of substring matching). There is no change to the actual firmware, wallet logic, or any code that runs on a user's device. It cannot affect real users or introduce a security vulnerability.
No security action needed. Treat as a normal test-quality improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies tests/click_tests/test_passphrase_caesar.py, replacing in substring assertions with == equality assertions and not in with !=. This is a test-hardening change that ensures the displayed passphrase matches exactly rather than merely containing the expected string. No production code is touched.
Changed components
tests/click_tests/test_passphrase_caesar.pyInspect captured patch +3 / −3
### tests/click_tests/test_passphrase_caesar.py
@@ -215,7 +215,7 @@ def test_passphrase_input_over_limit(device_handler: "BackgroundDeviceHandler"):
# First `len(CommonPass.AAA_LIMIT)` chars
input_passphrase(debug, CommonPass.AAA_LONGER[:-1])
layout = debug.read_layout()
- assert CommonPass.AAA_LONGER[:-1] in layout.passphrase()
+ assert CommonPass.AAA_LONGER[:-1] == layout.passphrase()
show_passphrase(debug)
@@ -224,8 +224,8 @@ def test_passphrase_input_over_limit(device_handler: "BackgroundDeviceHandler"):
# No change
layout = debug.read_layout()
- assert CommonPass.AAA_LONGER[:-1] in layout.passphrase()
- assert CommonPass.AAA_LONGER not in layout.passphrase()
+ assert CommonPass.AAA_LONGER[:-1] == layout.passphrase()
+ assert CommonPass.AAA_LONGER != layout.passphrase()
show_passphrase(debug)
enter_passphrase(debug)Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.