def test_status_statuscmd_fail(self, log, call):
call.side_effect = OSError(3, 'fail')
self.assertRaises(OSError, hookenv.status_set, 'active', 'msg')
call.assert_called_with(['status-set', 'active', 'msg'])
文章目录