#NEWLINE# def testRDFValueCollectionsAppend( self ) : #NEWLINE# #INDENT# urn = 'aff4:/test/collection' #NEWLINE# fd = aff4 . FACTORY . Create ( urn , 'RDFValueCollection' , mode = 'w' , token = self . token ) #NEWLINE# for i in range ( 5 ) : #NEWLINE# #INDENT# fd . Add ( rdf_flows . GrrMessage ( request_id = i ) ) #NEWLINE# #UNINDENT# fd . Close ( ) #NEWLINE# fd = aff4 . FACTORY . Open ( urn , 'RDFValueCollection' , mode = 'rw' , token = self . token ) #NEWLINE# for i in range ( 5 ) : #NEWLINE# #INDENT# fd . Add ( rdf_flows . GrrMessage ( request_id = ( i + 5 ) ) ) #NEWLINE# #UNINDENT# fd . Close ( ) #NEWLINE# fd = aff4 . FACTORY . Open ( urn , token = self . token ) #NEWLINE# j = 0 #NEWLINE# for ( j , x ) in enumerate ( fd ) : #NEWLINE# #INDENT# self . assertEqual ( j , x . request_id ) #NEWLINE# #UNINDENT# self . assertEqual ( j , 9 )