mirror of
https://gitlab.freedesktop.org/upower/power-profiles-daemon.git
synced 2026-01-03 13:50:15 +01:00
tests: Add tests for checking for profile existence
This commit is contained in:
parent
eefb002ac5
commit
cbdac3da5b
1 changed files with 7 additions and 0 deletions
|
|
@ -320,6 +320,13 @@ class Tests(dbusmock.DBusTestCase):
|
|||
self.set_dbus_property('ActiveProfile', GLib.Variant.new_string('power-saver'))
|
||||
self.assertEqual(self.get_dbus_property('ActiveProfile'), 'power-saver')
|
||||
|
||||
with self.assertRaises(gi.repository.GLib.GError):
|
||||
self.set_dbus_property('ActiveProfile', GLib.Variant.new_string('performance'))
|
||||
self.assertEqual(self.get_dbus_property('ActiveProfile'), 'power-saver')
|
||||
|
||||
with self.assertRaises(gi.repository.GLib.GError):
|
||||
cookie = self.call_dbus_method('HoldProfile', GLib.Variant("(sss)", ('performance', 'testReason', 'testApplication')))
|
||||
|
||||
# process = subprocess.Popen(['gdbus', 'introspect', '--system', '--dest', 'net.hadess.PowerProfiles', '--object-path', '/net/hadess/PowerProfiles'])
|
||||
# print (self.get_dbus_property('GPUs'))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue