mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Lint fixes
This commit is contained in:
parent
899ba78e79
commit
30d8be877d
@ -185,5 +185,3 @@ def get_hibernate_timeout():
|
||||
salt '*' powercfg.get_hibernate_timeout
|
||||
'''
|
||||
return _get_powercfg_minute_values(_get_current_scheme(), "SUB_SLEEP", "HIBERNATEIDLE")
|
||||
|
||||
|
||||
|
@ -21,6 +21,7 @@ ensure_in_syspath('../../')
|
||||
|
||||
powercfg.__salt__ = {}
|
||||
|
||||
|
||||
@skipIf(NO_MOCK, NO_MOCK_REASON)
|
||||
class PowerCfgTestCase(TestCase):
|
||||
query_ouput = '''Subgroup GUID: 238c9fa8-0aad-41ed-83f4-97be242c8f20 (Hibernate)
|
||||
@ -64,7 +65,6 @@ class PowerCfgTestCase(TestCase):
|
||||
powercfg.set_standby_timeout(0, "dc")
|
||||
mock.assert_called_once_with('powercfg /x standby-timeout-dc 0', python_shell=False)
|
||||
|
||||
|
||||
def test_set_hibernate_timeout(self):
|
||||
'''
|
||||
Test to make sure we can set the hibernate timeout value
|
||||
@ -74,7 +74,6 @@ class PowerCfgTestCase(TestCase):
|
||||
powercfg.set_hibernate_timeout(0, "dc")
|
||||
mock.assert_called_once_with('powercfg /x hibernate-timeout-dc 0', python_shell=False)
|
||||
|
||||
|
||||
def test_get_monitor_timeout(self):
|
||||
'''
|
||||
Test to make sure we can get the monitor timeout value
|
||||
@ -92,7 +91,6 @@ class PowerCfgTestCase(TestCase):
|
||||
|
||||
self.assertEqual({'ac': 30, 'dc': 15}, ret)
|
||||
|
||||
|
||||
def test_get_disk_timeout(self):
|
||||
'''
|
||||
Test to make sure we can get the disk timeout value
|
||||
|
@ -20,6 +20,7 @@ ensure_in_syspath('../../')
|
||||
|
||||
powercfg.__salt__ = {}
|
||||
|
||||
|
||||
@skipIf(NO_MOCK, NO_MOCK_REASON)
|
||||
class PowerCfgTestCase(TestCase):
|
||||
'''
|
||||
@ -54,7 +55,6 @@ class PowerCfgTestCase(TestCase):
|
||||
ret = {'changes': {}, 'comment': 'fakesetting is not a valid setting', 'name': 'fakesetting', 'result': False}
|
||||
self.assertEqual(powercfg.set_timeout("fakesetting", 0), ret)
|
||||
|
||||
|
||||
def test_fail_invalid_power(self):
|
||||
'''
|
||||
Test to make sure we can set the monitor timeout value
|
||||
|
Loading…
Reference in New Issue
Block a user