#NEWLINE# def test02_iter( self ) : #NEWLINE# #INDENT# rc = ResourceContainer ( resources = [ ] ) #NEWLINE# rc . resources . append ( Resource ( 'a' , timestamp = 1 ) ) #NEWLINE# rc . resources . append ( Resource ( 'b' , timestamp = 2 ) ) #NEWLINE# rc . resources . append ( Resource ( 'c' , timestamp = 3 ) ) #NEWLINE# rc . resources . append ( Resource ( 'd' , timestamp = 4 ) ) #NEWLINE# resources = [ ] #NEWLINE# for r in rc : #NEWLINE# #INDENT# resources . append ( r ) #NEWLINE# #UNINDENT# self . assertEqual ( len ( resources ) , 4 ) #NEWLINE# self . assertEqual ( resources [ 0 ] . uri , 'a' ) #NEWLINE# self . assertEqual ( resources [ 3 ] . uri , 'd' )