def testGetFileObject(self):
    test_file = u'/test_data/testdir_fake/file1.txt'
    path_spec = fake_path_spec.FakePathSpec(location=test_file)
    file_entry = self._file_system.GetFileEntryByPathSpec(path_spec)
    self.assertIsNotNone(file_entry)

    file_object = file_entry.GetFileObject()

    self.assertIsNotNone(file_object)

    file_data = file_object.read()
    self.assertEqual(file_data, b'FILE1')

    file_object.close()
Test the get file object functionality.
dataset/ETHPy150Open log2timeline/dfvfs/tests/vfs/fake_file_entry.py/FakeFileEntryTest.testGetFileObject