ha(ux): пробинг отдаёт fatal-reason (одна сессия на недоступном модуле); SWITCH_PROPS без битов
This commit is contained in:
@@ -580,7 +580,7 @@ async def test_run_trial_probes_unknown_model(hass: HomeAssistant):
|
||||
from custom_components.fglair import config_flow as cf
|
||||
|
||||
with patch.object(
|
||||
cf, "probe_template", return_value=(Template.B, {})
|
||||
cf, "probe_template", return_value=(Template.B, {}, None)
|
||||
) as probe, patch.object(
|
||||
cf, "trial_connect", return_value=TrialResult(ok=True)
|
||||
):
|
||||
|
||||
@@ -115,7 +115,8 @@ def test_probe_stops_on_unreachable(monkeypatch):
|
||||
return tr.TrialResult(ok=False, reason="unreachable")
|
||||
|
||||
monkeypatch.setattr(tr, "trial_connect", fake_trial)
|
||||
template, props = tr.probe_template("host", "dsn", "key", 1)
|
||||
template, props, fatal = tr.probe_template("host", "dsn", "key", 1)
|
||||
assert template is None
|
||||
assert props == {}
|
||||
assert fatal == "unreachable"
|
||||
assert calls == [Template.A]
|
||||
|
||||
Reference in New Issue
Block a user