tests: Assert correct monitor implementation is used in power-profile-monitor-dbus

This wasn’t failing, but it seems like a sensible thing to check.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #2887
This commit is contained in:
Philip Withnall 2024-01-22 14:06:35 +00:00
parent 6b22aaaa68
commit 1f2d9e69c9

View File

@ -57,6 +57,7 @@ try:
self.power_saver_enabled = False
self.dbus_props = dbus.Interface(self.obj_ppd, dbus.PROPERTIES_IFACE)
self.power_profile_monitor = Gio.PowerProfileMonitor.dup_default()
assert("GPowerProfileMonitorDBus" in str(self.power_profile_monitor))
self.power_profile_monitor.connect("notify::power-saver-enabled", self.power_saver_enabled_cb)
self.mainloop = GLib.MainLoop()
self.main_context = self.mainloop.get_context()