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")
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')