#NEWLINE# def CheckFlow( self ) : #NEWLINE# #INDENT# pos = self . output_path . find ( '*' ) #NEWLINE# urn = None #NEWLINE# if ( pos > 0 ) : #NEWLINE# #INDENT# base_urn = self . client_id . Add ( self . output_path [ : pos ] ) #NEWLINE# for urn in base . RecursiveListChildren ( prefix = self , token = self . token ) : #NEWLINE# #INDENT# if re . search ( ( self . output_path + '$' ) , str ( urn ) ) : #NEWLINE# #INDENT# self . delete_urns . add ( urn . Add ( self . file_to_find ) ) #NEWLINE# self . delete_urns . add ( urn ) #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# self . assertNotEqual ( urn , None , 'Could not locate Directory.' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# urn = self . client_id . Add ( self . output_path ) #NEWLINE# #UNINDENT# fd = aff4 . FACTORY . Open ( urn . Add ( self . file_to_find ) , mode = 'r' , token = self . token ) #NEWLINE# if ( type ( fd ) == aff4 . AFF4Volume ) : #NEWLINE# #INDENT# self . fail ( 'No results were written to the data store. Maybe the GRR client is not running with root privileges?' ) #NEWLINE# #UNINDENT# self . assertEqual ( type ( fd ) , aff4 . VFSFile )