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

Share MessageBus across dbus objects (#3860)

* Share MessageBus across dbus objects

* Fix connect calls in tests
This commit is contained in:
Mike Degatano
2022-09-12 14:10:12 -04:00
committed by GitHub
parent 4f272ad4fd
commit b71c6c60da
43 changed files with 222 additions and 136 deletions

View File

@@ -22,8 +22,11 @@ def test_remove_dbus_signature():
async def test_dbus_prepare_args(coresys: CoreSys):
"""Check D-Bus dynamic argument builder."""
dbus = DBus("org.freedesktop.systemd1", "/org/freedesktop/systemd1")
signature, args = dbus._prepare_args(
dbus = DBus(
coresys.dbus.bus, "org.freedesktop.systemd1", "/org/freedesktop/systemd1"
)
# pylint: disable=protected-access
signature, _ = dbus._prepare_args(
True, 1, 1.0, "Value", ("a{sv}", {"Key": "Value"})
)
assert signature == "bidsa{sv}"