Exemple #1
0
 def test_saltify_reboot(self):
     mm_cmd = MagicMock(return_value=True)
     lcl = salt.client.LocalClient()
     lcl.cmd = mm_cmd
     with patch("salt.client.LocalClient", return_value=lcl):
         result = saltify.reboot("nodeS1", "action")
         mm_cmd.assert_called_with("nodeS1", "system.reboot")
         self.assertTrue(result)
Exemple #2
0
 def test_saltify_reboot(self):
     mm_cmd = MagicMock(return_value=True)
     lcl = salt.client.LocalClient()
     lcl.cmd = mm_cmd
     with patch('salt.client.LocalClient', return_value=lcl):
         result = saltify.reboot('nodeS1', 'action')
         mm_cmd.assert_called_with('nodeS1', 'system.reboot')
         self.assertTrue(result)