Ejemplo n.º 1
0
 def test_system_info(self):
     """
     Tests to return System information
     """
     mock = MagicMock(return_value={"retcode": 0, "stdout": None})
     with patch.dict(drac.__salt__, {"cmd.run_all": mock}):
         mock = MagicMock(return_value="ABC")
         with patch.object(drac, "__parse_drac", mock):
             self.assertEqual(drac.system_info(), "ABC")
Ejemplo n.º 2
0
 def test_system_info(self):
     '''
     Tests to return System information
     '''
     mock = MagicMock(return_value={'retcode': 0, 'stdout': None})
     with patch.dict(drac.__salt__, {'cmd.run_all': mock}):
         mock = MagicMock(return_value='ABC')
         with patch.object(drac, '__parse_drac', mock):
             self.assertEqual(drac.system_info(), 'ABC')
Ejemplo n.º 3
0
 def test_system_info(self):
     '''
     Tests to return System information
     '''
     mock = MagicMock(return_value={'retcode': 0, 'stdout': None})
     with patch.dict(drac.__salt__, {'cmd.run_all': mock}):
         mock = MagicMock(return_value='ABC')
         with patch.object(drac, '__parse_drac', mock):
             self.assertEqual(drac.system_info(), 'ABC')