'Ensure we can extract packages from dpkg output.'

def testDpkgCmdParser(self):

    parser = linux_cmd_parser.DpkgCmdParser()
    content = open(os.path.join(self.base_path, 'checks/data/dpkg.out'), 'rb').read()
    out = list(parser.Parse('/usr/bin/dpkg', ['--list'], content, '', 0, 5, None))
    self.assertEqual(len(out), 181)
    self.assertTrue(isinstance(out[1], rdf_client.SoftwarePackage))
    self.assertTrue(out[0].name, 'acpi-support-base')
