Reduce scope of diagnostics tests for rtsp_to_webrtc to not depend on global state (#115422)

pull/115424/head
Allen Porter 2024-04-11 09:13:39 -07:00 committed by GitHub
parent f558121752
commit 6c1bc2a9f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 8 deletions

View File

@ -2,8 +2,6 @@
from typing import Any
from freezegun.api import FrozenDateTimeFactory
from homeassistant.core import HomeAssistant
from .conftest import ComponentSetup
@ -21,13 +19,9 @@ async def test_entry_diagnostics(
config_entry: MockConfigEntry,
rtsp_to_webrtc_client: Any,
setup_integration: ComponentSetup,
freezer: FrozenDateTimeFactory,
) -> None:
"""Test config entry diagnostics."""
await setup_integration()
assert await get_diagnostics_for_config_entry(hass, hass_client, config_entry) == {
"discovery": {"attempt": 1, "web.failure": 1, "webrtc.success": 1},
"web": {},
"webrtc": {},
}
result = await get_diagnostics_for_config_entry(hass, hass_client, config_entry)
assert "webrtc" in result