'Ensure we can extract packages from yum output.'

def testYumListCmdParser(self):

    parser = linux_cmd_parser.YumListCmdParser()
    content = open(os.path.join(self.base_path, 'yum.out'), 'rb').read()
    out = list(parser.Parse('/usr/bin/yum', ['list    installed    -q'], content, '', 0, 5, None))
    self.assertEqual(len(out), 2)
    self.assertTrue(isinstance(out[0], rdf_client.SoftwarePackage))
    self.assertEqual(out[0].name, 'ConsoleKit')
    self.assertEqual(out[0].architecture, 'x86_64')
    self.assertEqual(out[0].publisher, '@base')
