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:
committed by
GitHub
parent
687bf5e808
commit
af689d7c3e
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user