Commit bd48061
test(tools_integrations): pin diagnostic-hint wording on raise branches
Addresses kp13's second review-pass on PR homeassistant-ai#1424:
- Item 1 (Ruff format on test_tools_integrations.py): already addressed
upstream in 98f6ed2 — no action in this commit.
- Item 2: adds the missing `"already_deleted" not in json.dumps(err)`
assertion to test_remove_helpers_integrations_subentry_other_error_
surfaces_service_call_failed in test_config_subentries_folded.py.
Symmetric with the string-form sibling test below that already pins
the no-mislabeling rule.
- "While you're in there": adds diagnostic-hint substring assertions
to all six confirmed-absent raise-branch tests so the user-facing
wording (the "May indicate ... typo" framing + the matching
ha_search_entities() / ha_get_integration() tool suggestion, or the
TOCTOU-specific "concurrent removal" hint) can't silently degrade
on future edits.
Test additions per branch:
- test_direct_path_entry_not_found_raises (Path 3): pin "May indicate"
+ "ha_get_integration"
- test_simple_path_state_gone_raises_entity_not_found (Path 1): pin
"May indicate" + "ha_search_entities"
- test_simple_path_404_on_state_check_raises_entity_not_found (Path 1
via 404): same pins as state-gone sibling
- test_flow_path_entity_not_in_registry_raises (Path 2 step 1): pin
"May indicate" + "ha_search_entities"
- test_flow_path_entry_not_found_at_delete_raises (Path 2 TOCTOU):
pin "concurrent removal" (distinct from the typo-framed hint —
semantically the entry WAS resolvable at step 1 and only vanished
before step 3)
- test_remove_helpers_integrations_subentry_not_found_raises (Path 4):
pin "May indicate" + "ha_get_integration"
76 unit tests pass locally. Ruff format clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 98f6ed2 commit bd48061
2 files changed
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
529 | 529 | | |
530 | 530 | | |
531 | 531 | | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
532 | 535 | | |
533 | 536 | | |
534 | 537 | | |
| |||
559 | 562 | | |
560 | 563 | | |
561 | 564 | | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
562 | 569 | | |
563 | 570 | | |
564 | 571 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
212 | 219 | | |
213 | 220 | | |
214 | 221 | | |
| |||
358 | 365 | | |
359 | 366 | | |
360 | 367 | | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
361 | 371 | | |
362 | 372 | | |
363 | 373 | | |
| |||
395 | 405 | | |
396 | 406 | | |
397 | 407 | | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
398 | 412 | | |
399 | 413 | | |
400 | 414 | | |
| |||
643 | 657 | | |
644 | 658 | | |
645 | 659 | | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
646 | 663 | | |
647 | 664 | | |
648 | 665 | | |
| |||
723 | 740 | | |
724 | 741 | | |
725 | 742 | | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
726 | 748 | | |
727 | 749 | | |
728 | 750 | | |
| |||
0 commit comments