[gnome-settings-daemon] power: Fix tests relying on hibernation



commit 2da7ee5f913070f582e7757d2ce6a3a8cd1f63bb
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Sep 17 17:50:42 2013 +0200

    power: Fix tests relying on hibernation
    
    We set ourselves up as not supporting hibernation, but supporting
    suspend. As hibernation preferences fall back to PowerOff when
    CanHibernate is false, we'd need to either check for PowerOff as well,
    or force using suspend by default. We did the latter.

 plugins/power/test.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plugins/power/test.py b/plugins/power/test.py
index 10f2826..40dee4f 100755
--- a/plugins/power/test.py
+++ b/plugins/power/test.py
@@ -85,6 +85,8 @@ class PowerPluginTest(gsdtestcase.GSDTestCase):
 
         # start power plugin
         self.settings_gsd_power['active'] = False
+        # As hibernate is not available, suspend by default on critical
+        self.settings_gsd_power['critical-battery-action'] = 'suspend'
         Gio.Settings.sync()
         self.plugin_log_write = open(os.path.join(self.workdir, 'plugin_power.log'), 'wb')
         # avoid painfully long delays of actions for tests


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]