tests: Assert correct monitor implementation is used in memory-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 13:59:49 +00:00
parent e3b81b3f0d
commit 6b22aaaa68

View File

@ -58,6 +58,7 @@ try:
self.last_warning = -1
self.dbusmock = dbus.Interface(self.obj_lmm, dbusmock.MOCK_IFACE)
self.memory_monitor = Gio.MemoryMonitor.dup_default()
assert("GMemoryMonitorDBus" in str(self.memory_monitor))
self.memory_monitor.connect("low-memory-warning", self.memory_warning_cb)
self.mainloop = GLib.MainLoop()
self.main_context = self.mainloop.get_context()