summaryrefslogtreecommitdiff
path: root/plugins/power
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2018-10-04 12:06:58 +0200
committerBenjamin Berg <bberg@redhat.com>2018-12-17 16:26:13 +0100
commit18f069b6fe859b970548ee8cce9ec3519872db54 (patch)
treec68dc60d8a42bbab5a361ff7fbdf7ba84e739613 /plugins/power
parent4dd4892905ec9bcbd3581327b33735f110f87c23 (diff)
downloadgnome-settings-daemon-18f069b6fe859b970548ee8cce9ec3519872db54.tar.gz
Revert "power: Test Suspend and SuspendAndHibernate separately"
This reverts commit 20526020b08ed9eade4d6c273a7c3cd535cfab49.
Diffstat (limited to 'plugins/power')
-rwxr-xr-xplugins/power/test.py24
1 files changed, 3 insertions, 21 deletions
diff --git a/plugins/power/test.py b/plugins/power/test.py
index 0d4905d1..739f3a12 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'''