summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2023-02-28 13:42:36 +0100
committerBastien Nocera <hadess@hadess.net>2023-02-28 13:42:36 +0100
commitb6143527ef06d05fc60f7778d46a71ba79741f52 (patch)
tree7c0027a71056e04a6b7f76cce8f2941dd0ad0d74
parent46257ff36e01326985375d0baee54f67fad1d98b (diff)
downloadupower-b6143527ef06d05fc60f7778d46a71ba79741f52.tar.gz
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.
-rwxr-xr-xsrc/linux/integration-test.py6
1 files changed, 6 insertions, 0 deletions
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()