def test__exec_ipmitool_none(self, check_mock): check_mock.side_effect = Exception cmd = "fru print 0x2" actual_out = ipmi._exec_ipmitool(self.info, cmd) self.assertIsNone(actual_out)
def test__exec_ipmitool(self, check_mock): check_mock.return_value = constants.NIC_FRU_OUT expected_output = constants.NIC_FRU_OUT cmd = "fru print 0x64" actual_out = ipmi._exec_ipmitool(self.info, cmd) self.assertEqual(expected_output, actual_out)