Ejemplo n.º 1
0
 def test_disable(self):
     '''
     Test if it disable firewall profile :(default: allprofiles)
     '''
     mock_cmd = MagicMock(return_value='Ok.')
     with patch.dict(win_firewall.__salt__, {'cmd.run': mock_cmd}):
         self.assertTrue(win_firewall.disable())
Ejemplo n.º 2
0
 def test_disable(self):
     """
     Test if it disable firewall profile :(default: allprofiles)
     """
     mock_cmd = MagicMock(return_value="Ok.")
     with patch.dict(win_firewall.__salt__, {"cmd.run": mock_cmd}):
         self.assertTrue(win_firewall.disable())
Ejemplo n.º 3
0
 def test_disable(self):
     '''
     Test if it disable firewall profile :(default: allprofiles)
     '''
     mock_cmd = MagicMock(return_value='Ok.')
     with patch.dict(win_firewall.__salt__, {'cmd.run': mock_cmd}):
         self.assertTrue(win_firewall.disable())
         mock_cmd.assert_called_once_with(['netsh', 'advfirewall', 'set', 'allprofiles', 'state', 'off'],
                                          python_shell=False)