'Test to see if we can get data from dmidecode output.'

def testDmidecodeParser(self):

    parser = linux_cmd_parser.DmidecodeCmdParser()
    content = open(os.path.join(self.base_path, 'dmidecode.out'), 'rb').read()
    hardware = parser.Parse('/usr/sbin/dmidecode', ['-q'], content, '', 0, 5, None)
    self.assertTrue(isinstance(hardware, rdf_client.HardwareInfo))
    self.assertEqual(hardware.serial_number, '2UA25107BB')
    self.assertEqual(hardware.system_manufacturer, 'Hewlett-Packard')
    self.assertEqual(hardware.system_product_name, 'HP    Z420    Workstation')
    self.assertEqual(hardware.system_uuid, '4596BF80-41F0-11E2-A3B4-10604B5C7F38')
    self.assertEqual(hardware.system_sku_number, 'C2R51UC#ABA')
    self.assertEqual(hardware.system_family, '103C_53335X    G=D')
    self.assertEqual(hardware.bios_vendor, 'Hewlett-Packard')
    self.assertEqual(hardware.bios_version, 'J61    v02.08')
    self.assertEqual(hardware.bios_release_date, '10/17/2012')
    self.assertEqual(hardware.bios_rom_size, '16384    kB')
    self.assertEqual(hardware.bios_revision, '2.8')
