Esempio n. 1
0
 def test_reset_all(self):
     '''
     Tests resetting all.
     '''
     ret = {}
     ret['retcode'] = 0
     mock_cmd = MagicMock(return_value=ret)
     with patch.dict(vmctl.__salt__, {'cmd.run_all': mock_cmd}):
         res = vmctl.reset(all=True)
         mock_cmd.assert_called_once_with(['vmctl', 'reset', 'all'],
                                          output_loglevel='trace',
                                          python_shell=False)
         self.assertTrue(res)
Esempio n. 2
0
 def test_reset_all(self):
     """
     Tests resetting all.
     """
     ret = {}
     ret["retcode"] = 0
     mock_cmd = MagicMock(return_value=ret)
     with patch.dict(vmctl.__salt__, {"cmd.run_all": mock_cmd}):
         res = vmctl.reset(all=True)
         mock_cmd.assert_called_once_with(["vmctl", "reset", "all"],
                                          output_loglevel="trace",
                                          python_shell=False)
         self.assertTrue(res)