1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Use snapshot assertion for Accuweather diagnostics (#98725)

This commit is contained in:
Joost Lekkerkerker
2023-08-21 09:12:43 +02:00
committed by GitHub
parent 687bf5e808
commit af689d7c3e
2 changed files with 309 additions and 8 deletions

View File

@@ -1,4 +1,5 @@
"""Test AccuWeather diagnostics."""
from syrupy import SnapshotAssertion
from homeassistant.core import HomeAssistant
@@ -10,7 +11,9 @@ from tests.typing import ClientSessionGenerator
async def test_entry_diagnostics(
hass: HomeAssistant, hass_client: ClientSessionGenerator
hass: HomeAssistant,
hass_client: ClientSessionGenerator,
snapshot: SnapshotAssertion,
) -> None:
"""Test config entry diagnostics."""
entry = await init_integration(hass)
@@ -23,10 +26,4 @@ async def test_entry_diagnostics(
result = await get_diagnostics_for_config_entry(hass, hass_client, entry)
assert result["config_entry_data"] == {
"api_key": "**REDACTED**",
"latitude": "**REDACTED**",
"longitude": "**REDACTED**",
"name": "Home",
}
assert result["coordinator_data"] == coordinator_data
assert result == snapshot