1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 12:29:08 +00:00

No unpack variants for property sets (#3911)

This commit is contained in:
Mike Degatano
2022-09-29 12:13:02 -04:00
committed by GitHub
parent 2be33a80a7
commit c0a409b25f
2 changed files with 28 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
"""Test Supervisor API."""
# pylint: disable=protected-access
import asyncio
from unittest.mock import patch
from aiohttp.test_utils import TestClient
@@ -114,3 +115,17 @@ async def test_api_supervisor_options_auto_update(
assert response.status == 200
assert coresys.updater.auto_update is False
async def test_api_supervisor_options_diagnostics(
api_client: TestClient, coresys: CoreSys, dbus: list[str]
):
"""Test changing diagnostics."""
await coresys.dbus.agent.connect(coresys.dbus.bus)
dbus.clear()
response = await api_client.post("/supervisor/options", json={"diagnostics": True})
await asyncio.sleep(0)
assert response.status == 200
assert dbus == ["/io/hass/os-io.hass.os.Diagnostics"]