We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf95130 commit d69142aCopy full SHA for d69142a
tests/unit/modules/status_test.py
@@ -145,8 +145,10 @@ def test_uptime_return_success_not_supported(self):
145
'''
146
Test modules.status.uptime function for other platforms
147
148
+ exc_mock = MagicMock(side_effect=CommandExecutionError)
149
with self.assertRaises(CommandExecutionError):
- status.uptime()
150
+ with patch.dict(status.__salt__, {'cmd.run': exc_mock}):
151
+ status.uptime()
152
153
154
if __name__ == '__main__':
0 commit comments