From b6143527ef06d05fc60f7778d46a71ba79741f52 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 28 Feb 2023 13:42:36 +0100 Subject: linux: Fix dbusmock addition of fake battery We need to send the InterfacesAdded signal in case upower is already started, so it can properly keep track of the interesting bluez devices. --- src/linux/integration-test.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/linux/integration-test.py b/src/linux/integration-test.py index 3bdee15..1acb5de 100755 --- a/src/linux/integration-test.py +++ b/src/linux/integration-test.py @@ -2080,6 +2080,12 @@ class Tests(dbusmock.DBusTestCase): } device.AddProperties(BATTERY_IFACE, battery_properties) + bluez_manager = self.dbus_con.get_object('org.bluez', '/') + bluez_manager.EmitSignal(dbusmock.OBJECT_MANAGER_IFACE, 'InterfacesAdded', + 'oa{sa{sv}}', [ + dbus.ObjectPath(path, variant_level=1), + {BATTERY_IFACE: battery_properties}, + ]) self.start_daemon() -- cgit v1.2.1