#NEWLINE# def testGetFileObject( self ) : #NEWLINE# #INDENT# 'Test the get file object functionality.' #NEWLINE# test_file = '/test_data/testdir_fake/file1.txt' #NEWLINE# path_spec = fake_path_spec . FakePathSpec ( location = test_file ) #NEWLINE# file_entry = self . _file_system . GetFileEntryByPathSpec ( path_spec ) #NEWLINE# self . assertIsNotNone ( file_entry ) #NEWLINE# file_object = file_entry . GetFileObject ( ) #NEWLINE# self . assertIsNotNone ( self ) #NEWLINE# file_data = file_object . read ( ) #NEWLINE# self . assertEqual ( file_data , b'FILE1' ) #NEWLINE# file_object . close ( )