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

Dbus refactor and tests (#3854)

* Dbus refactor and tests

* Link to timedate introspection
This commit is contained in:
Mike Degatano
2022-09-12 11:59:56 -04:00
committed by GitHub
parent 611128c014
commit 4f272ad4fd
52 changed files with 920 additions and 321 deletions

View File

@@ -6,12 +6,13 @@ from supervisor.coresys import CoreSys
from supervisor.exceptions import DBusNotConnectedError
async def test_dbus_osagent_system_wipe(coresys: CoreSys):
async def test_dbus_osagent_system_wipe(coresys: CoreSys, dbus: list[str]):
"""Test wipe data partition on host."""
with pytest.raises(DBusNotConnectedError):
await coresys.dbus.agent.system.schedule_wipe_device()
await coresys.dbus.agent.connect()
dbus.clear()
assert await coresys.dbus.agent.system.schedule_wipe_device() is None
assert dbus == ["/io/hass/os/System-io.hass.os.System.ScheduleWipeDevice"]