Commit b8709ab
committed
fix(test): sanitize entity_id in _backups_for + use list_groups for group poll
Two follow-ups after the previous merge run cleared 2 of 5 failures
but exposed two distinct test-side bugs in what was left:
1. ``_backups_for`` filter was still comparing original entity_id
against the sanitized form returned by ``list_snapshots``.
``list_snapshots`` itself now sanitizes its filter argument (so
the backend correctly returns matching entries), but the
``_backups_for`` python-side filter in the test re-checks
equality against the original composite ID — which never matches
the sanitized form on ``area:foo`` / ``automation:cat_id`` style
IDs. Apply ``_safe_entity_id`` symmetrically so both sides of the
comparison go through the same function.
2. Group's ``ha_get_state`` poll timed out at 15 s because the
``/api/states/group.<id>`` propagation lags by several seconds on
fresh testcontainers. The existing ``tests/.../groups/
test_lifecycle.py`` proves ``ha_config_list_groups`` surfaces a
newly-created group with no wait at all. Switch the group test's
readiness poll to ``ha_config_list_groups`` (timeout 20 s for
headroom) — by the time list_groups returns our group, the
service-call has finished and the decorator's pre-edit
``/api/states/group.<id>`` GET should succeed.1 parent 356b5e4 commit b8709ab
1 file changed
Lines changed: 25 additions & 11 deletions
Lines changed: 25 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
51 | 63 | | |
52 | 64 | | |
53 | 65 | | |
| |||
1027 | 1039 | | |
1028 | 1040 | | |
1029 | 1041 | | |
1030 | | - | |
1031 | | - | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
1032 | 1047 | | |
1033 | 1048 | | |
1034 | | - | |
1035 | | - | |
1036 | | - | |
1037 | | - | |
1038 | | - | |
1039 | | - | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
1040 | 1054 | | |
1041 | | - | |
1042 | | - | |
| 1055 | + | |
| 1056 | + | |
1043 | 1057 | | |
1044 | 1058 | | |
1045 | 1059 | | |
| |||
0 commit comments