mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Add tests for Aussie Broadband diagnostics (#113049)
* Add tests for diag * Fix docstring * Spelling
This commit is contained in:
parent
a0d50ecdf5
commit
6d440e36ad
@ -0,0 +1,40 @@
|
|||||||
|
# serializer version: 1
|
||||||
|
# name: test_select_async_setup_entry
|
||||||
|
dict({
|
||||||
|
'services': list([
|
||||||
|
dict({
|
||||||
|
'service': dict({
|
||||||
|
'coordinator': '**REDACTED**',
|
||||||
|
'description': '**REDACTED**',
|
||||||
|
'name': 'NBN',
|
||||||
|
'service_id': '12345678',
|
||||||
|
'type': 'NBN',
|
||||||
|
}),
|
||||||
|
'usage': dict({
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
dict({
|
||||||
|
'service': dict({
|
||||||
|
'coordinator': '**REDACTED**',
|
||||||
|
'description': '**REDACTED**',
|
||||||
|
'name': 'Mobile',
|
||||||
|
'service_id': '87654321',
|
||||||
|
'type': 'PhoneMobile',
|
||||||
|
}),
|
||||||
|
'usage': dict({
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
dict({
|
||||||
|
'service': dict({
|
||||||
|
'coordinator': '**REDACTED**',
|
||||||
|
'description': '**REDACTED**',
|
||||||
|
'name': 'VOIP',
|
||||||
|
'service_id': '23456789',
|
||||||
|
'type': 'VOIP',
|
||||||
|
}),
|
||||||
|
'usage': dict({
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
]),
|
||||||
|
})
|
||||||
|
# ---
|
22
tests/components/aussie_broadband/test_diagnostics.py
Normal file
22
tests/components/aussie_broadband/test_diagnostics.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
"""Test the Aussie Broadband Diagnostics."""
|
||||||
|
|
||||||
|
from syrupy.assertion import SnapshotAssertion
|
||||||
|
|
||||||
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
|
from .common import setup_platform
|
||||||
|
|
||||||
|
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
||||||
|
from tests.typing import ClientSessionGenerator
|
||||||
|
|
||||||
|
|
||||||
|
async def test_select_async_setup_entry(
|
||||||
|
hass: HomeAssistant,
|
||||||
|
hass_client: ClientSessionGenerator,
|
||||||
|
snapshot: SnapshotAssertion,
|
||||||
|
) -> None:
|
||||||
|
"""Test diagnostics platform."""
|
||||||
|
|
||||||
|
entry = await setup_platform(hass, [])
|
||||||
|
diag = await get_diagnostics_for_config_entry(hass, hass_client, entry)
|
||||||
|
assert diag == snapshot
|
Loading…
x
Reference in New Issue
Block a user