mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Use snapshot assertion for wiz diagnostics test (#99154)
This commit is contained in:
parent
bdfdeb2bc0
commit
d94b09655b
16
tests/components/wiz/snapshots/test_diagnostics.ambr
Normal file
16
tests/components/wiz/snapshots/test_diagnostics.ambr
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# serializer version: 1
|
||||||
|
# name: test_diagnostics
|
||||||
|
dict({
|
||||||
|
'data': dict({
|
||||||
|
'homeId': '**REDACTED**',
|
||||||
|
'mocked': 'mocked',
|
||||||
|
'roomId': '**REDACTED**',
|
||||||
|
}),
|
||||||
|
'entry': dict({
|
||||||
|
'data': dict({
|
||||||
|
'host': '1.1.1.1',
|
||||||
|
}),
|
||||||
|
'title': 'Mock Title',
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
# ---
|
@ -1,4 +1,6 @@
|
|||||||
"""Test WiZ diagnostics."""
|
"""Test WiZ diagnostics."""
|
||||||
|
from syrupy import SnapshotAssertion
|
||||||
|
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
from . import async_setup_integration
|
from . import async_setup_integration
|
||||||
@ -8,17 +10,11 @@ from tests.typing import ClientSessionGenerator
|
|||||||
|
|
||||||
|
|
||||||
async def test_diagnostics(
|
async def test_diagnostics(
|
||||||
hass: HomeAssistant, hass_client: ClientSessionGenerator
|
hass: HomeAssistant,
|
||||||
|
hass_client: ClientSessionGenerator,
|
||||||
|
snapshot: SnapshotAssertion,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test generating diagnostics for a config entry."""
|
"""Test generating diagnostics for a config entry."""
|
||||||
_, entry = await async_setup_integration(hass)
|
_, entry = await async_setup_integration(hass)
|
||||||
diag = await get_diagnostics_for_config_entry(hass, hass_client, entry)
|
|
||||||
|
|
||||||
assert diag == {
|
assert await get_diagnostics_for_config_entry(hass, hass_client, entry) == snapshot
|
||||||
"data": {
|
|
||||||
"homeId": "**REDACTED**",
|
|
||||||
"mocked": "mocked",
|
|
||||||
"roomId": "**REDACTED**",
|
|
||||||
},
|
|
||||||
"entry": {"data": {"host": "1.1.1.1"}, "title": "Mock Title"},
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user