#NEWLINE# def test_get_all_by_filters( self ) : #NEWLINE# #INDENT# fakes = [ self . fake_instance ( 1 ) , self . fake_instance ( 2 ) ] #NEWLINE# self . mox . StubOutWithMock ( db , 'instance_get_all_by_filters' ) #NEWLINE# db . instance_get_all_by_filters ( self . context , { #NEWLINE# #INDENT# 'foo' : 'bar' , #NEWLINE# #UNINDENT# } , 'uuid' , 'asc' , limit = None , marker = None , columns_to_join = [ 'metadata' ] ) . AndReturn ( fakes ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# inst_list = objects . InstanceList . get_by_filters ( self . context , { #NEWLINE# #INDENT# 'foo' : 'bar' , #NEWLINE# #UNINDENT# } , 'uuid' , 'asc' , expected_attrs = [ 'metadata' ] , use_slave = False ) #NEWLINE# for i in range ( 0 , len ( fakes ) ) : #NEWLINE# #INDENT# self . assertIsInstance ( inst_list . objects [ i ] , instance . Instance ) #NEWLINE# self . assertEqual ( fakes [ i ] [ 'uuid' ] , inst_list . objects [ i ] . uuid )