Exemplo n.º 1
0
 def test_disable(self):
     '''
     Test if it disables RDP the service on the server
     '''
     mock = MagicMock(return_value=True)
     with patch.dict(rdp.__salt__, {'cmd.run': mock}):
         self.assertTrue(rdp.disable())
Exemplo n.º 2
0
 def test_disable(self):
     """
     Test if it disables RDP the service on the server
     """
     mock = MagicMock(return_value=True)
     with patch.dict(rdp.__salt__, {"cmd.run": mock}):
         self.assertTrue(rdp.disable())
Exemplo n.º 3
0
 def test_disable(self):
     '''
     Test if it disables RDP the service on the server
     '''
     mock = MagicMock(return_value=True)
     with patch.dict(rdp.__salt__, {'cmd.run': mock}), \
             patch('salt.modules.rdp._parse_return_code_powershell',
                   MagicMock(return_value=0)):
         self.assertTrue(rdp.disable())
Exemplo n.º 4
0
 def test_disable(self):
     """
     Test if it disables RDP the service on the server
     """
     mock = MagicMock(return_value=True)
     with patch.dict(rdp.__salt__, {"cmd.run": mock}), patch(
         "salt.modules.rdp._parse_return_code_powershell", MagicMock(return_value=0)
     ):
         self.assertTrue(rdp.disable())