grr/core/grr_response_core/lib/parsers/linux_cmd_parser_test.py
def testDpkgCmdParser(self):
    """Ensure we can extract packages from dpkg output."""
    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.assertLen(out, 181)
    self.assertIsInstance(out[1], rdf_client.SoftwarePackage)
    self.assertTrue(out[0].name, "acpi-support-base")
Ensure we can extract packages from dpkg output.
Ensure we can extract packages from dpkg output.
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.assertLen(out, 181)
    self.assertIsInstance(out[1], rdf_client.SoftwarePackage)
    self.assertTrue(out[0].name, "acpi-support-base")
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 . assertLen ( out , 181 ) self . assertIsInstance ( out [ 1 ] , rdf_client . SoftwarePackage ) self . assertTrue ( out [ 0 ] . name , "acpi-support-base" )
Ensure we can extract packages from dpkg output.
Ensure we can extract packages from dpkg output .
"""Ensure we can extract packages from dpkg output."""
self