mirror of
https://gitlab.freedesktop.org/upower/power-profiles-daemon.git
synced 2026-05-01 13:47:57 +02:00
tests: Also ensure that the powerprofilesctl commands match with daemon
This commit is contained in:
parent
13c4202fc7
commit
867af41ab8
1 changed files with 4 additions and 0 deletions
|
|
@ -2019,6 +2019,8 @@ class Tests(dbusmock.DBusTestCase):
|
|||
sourcedir = os.getenv("top_srcdir", ".")
|
||||
tool_path = os.path.join(sourcedir, "src", "powerprofilesctl")
|
||||
|
||||
self.assertEqual(self.get_dbus_property("ActiveProfile"), "balanced")
|
||||
|
||||
cmd = subprocess.run([tool_path, "get"], capture_output=True, check=True)
|
||||
self.assertEqual(cmd.returncode, 0)
|
||||
self.assertEqual(cmd.stdout, b"balanced\n")
|
||||
|
|
@ -2028,6 +2030,8 @@ class Tests(dbusmock.DBusTestCase):
|
|||
)
|
||||
self.assertEqual(cmd.returncode, 0)
|
||||
|
||||
self.assertEqual(self.get_dbus_property("ActiveProfile"), "power-saver")
|
||||
|
||||
cmd = subprocess.run([tool_path, "get"], capture_output=True, check=True)
|
||||
self.assertEqual(cmd.returncode, 0)
|
||||
self.assertEqual(cmd.stdout, b"power-saver\n")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue