[gnome-settings-daemon/benzea/master-remove-suspend-then-hibernate: 1/2] Revert "power: Test Suspend and SuspendAndHibernate separately"



commit 5dbe62d27695da70ded509b5d0ae5e9082a3f4bd
Author: Benjamin Berg <bberg redhat com>
Date:   Thu Oct 4 12:06:58 2018 +0200

    Revert "power: Test Suspend and SuspendAndHibernate separately"
    
    This reverts commit 20526020b08ed9eade4d6c273a7c3cd535cfab49.

 plugins/power/test.py | 24 +++---------------------
 1 file changed, 3 insertions(+), 21 deletions(-)
---
diff --git a/plugins/power/test.py b/plugins/power/test.py
index c789940c..0beb4e51 100755
--- a/plugins/power/test.py
+++ b/plugins/power/test.py
@@ -627,9 +627,8 @@ class PowerPluginTest(gsdtestcase.GSDTestCase):
         # And check we're not idle
         self.assertEqual(self.get_status(), gsdpowerenums.GSM_PRESENCE_STATUS_AVAILABLE)
 
-    def test_sleep_inactive_battery_hibernate_then_suspend(self):
-        '''Verify we SuspendThenHibernate on sleep-inactive-battery-timeout when SuspendThenHibernate is 
available'''
-        # Hibernate then suspend is the default
+    def test_sleep_inactive_battery(self):
+        '''sleep-inactive-battery-timeout'''
 
         self.settings_session['idle-delay'] = 2
         self.settings_gsd_power['sleep-inactive-battery-timeout'] = 5
@@ -640,24 +639,7 @@ class PowerPluginTest(gsdtestcase.GSDTestCase):
 
         # suspend should happen after inactive sleep timeout + 1 s notification
         # delay + 1 s error margin
-        self.check_for_suspend(7, methods=['SuspendThenHibernate'])
-
-    def test_sleep_inactive_battery_no_hibernate_then_suspend(self):
-        '''Verify we Suspend on sleep-inactive-battery-timeout when SuspendThenHibernate is unavailable'''
-
-        # Patch up logind_ctl to not return "yes" for CanSuspendThenHibernate
-        self.logind_obj.AddMethod('org.freedesktop.login1.Manager', 'CanSuspendThenHibernate', '', 's', 'ret 
= "no"')
-
-        self.settings_session['idle-delay'] = 2
-        self.settings_gsd_power['sleep-inactive-battery-timeout'] = 5
-        self.settings_gsd_power['sleep-inactive-battery-type'] = 'suspend'
-
-        # wait for idle delay; should not yet suspend
-        self.check_no_suspend(2)
-
-        # suspend should happen after inactive sleep timeout + 1 s notification
-        # delay + 1 s error margin
-        self.check_for_suspend(7, methods=["Suspend"])
+        self.check_for_suspend(7)
 
     def _test_suspend_no_hibernate(self):
         '''suspend-no-hibernate'''


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