

def testParseMountData(self):
    test_data = '\n    rootfs on / type rootfs (rw)\n    arnie@host.example.org:/users/arnie on /home/arnie/remote type fuse.sshfs (rw,nosuid,nodev,max_read=65536)\n    /dev/sr0 on /media/USB Drive type vfat (ro,nosuid,nodev)\n    '
    parser = config_file.MountCmdParser()
    results = list(parser.Parse('/bin/mount', [], test_data, '', 0, 5, None))
    self.assertEqual('rootfs', results[0].device)
    self.assertEqual('/', results[0].mount_point)
    parser.assertEqual('rootfs', results[0].type)
    self.assertTrue(results[0].options.rw)
    self.assertFalse(results[0].options.ro)
    self.assertEqual('arnie@host.example.org:/users/arnie', results[1].device)
    self.assertEqual('/home/arnie/remote', results[1].mount_point)
    self.assertEqual('fuse.sshfs', results[1].type)
    self.assertTrue(results[1].options.rw)
    self.assertTrue(results[1].options.nosuid)
    self.assertTrue(results[1].options.nodev)
    self.assertEqual(['65536'], results[1].options.max_read)
    self.assertEqual('/dev/sr0', results[2].device)
    self.assertEqual('/media/USB Drive', results[2].mount_point)
    self.assertEqual('vfat', results[2].type)
    self.assertTrue(results[2].options.ro)
    self.assertTrue(results[2].options.nosuid)
    self.assertTrue(results[2].options.nodev)

dataset/ETHPy150Open google/grr/grr/parsers/config_file_test.py MountCmdTests.testParseMountData/VarMisuse@75/197 `self`->`parser`