Пример #1
0
 def test_disable_task(self):
     cmd_mock = Mock(return_value={"retcode": 0})
     with patch.dict(kapacitor.__salt__, {"cmd.run_all": cmd_mock}):
         kapacitor.disable_task("taskname")
     cmd_mock.assert_called_once_with(
         "kapacitor disable taskname", env=self.__class__.env
     )
Пример #2
0
 def test_disable_task(self):
     cmd_mock = Mock(return_value={'retcode': 0})
     with patch.dict(kapacitor.__salt__, {'cmd.run_all': cmd_mock}):
         kapacitor.disable_task('taskname')
     cmd_mock.assert_called_once_with('kapacitor disable taskname', env=self.__class__.env)
Пример #3
0
 def test_disable_task(self):
     cmd_mock = Mock(return_value=True)
     with patch.dict(kapacitor.__salt__, {'cmd.retcode': cmd_mock}):
         kapacitor.disable_task('taskname')
     cmd_mock.assert_called_once_with('kapacitor disable taskname')