#NEWLINE# def testSubFileEntries( self ) : #NEWLINE# #INDENT# 'Test the sub file entries iteration functionality.' #NEWLINE# path_spec = tsk_partition_path_spec . TSKPartitionPathSpec ( location = '/' , parent = self . _os_path_spec ) #NEWLINE# file_entry = self . _file_system . GetFileEntryByPathSpec ( path_spec ) #NEWLINE# self . assertIsNotNone ( file_entry ) #NEWLINE# self . assertEqual ( file_entry . number_of_sub_file_entries , 7 ) #NEWLINE# expected_sub_file_entry_names = [ '' , '' , '' , '' , '' , 'p1' , 'p2' ] #NEWLINE# sub_file_entry_names = [ ] #NEWLINE# for sub_file_entry in file_entry . sub_file_entries : #NEWLINE# #INDENT# sub_file_entry_names . append ( sub_file_entry . name ) #NEWLINE# #UNINDENT# self . assertEqual ( len ( sub_file_entry_names ) , len ( expected_sub_file_entry_names ) ) #NEWLINE# self . assertEqual ( sorted ( sub_file_entry_names ) , sorted ( expected_sub_file_entry_names ) )