#NEWLINE# def test_get_image_index_v1_1( self ) : #NEWLINE# #INDENT# request = webob . Request . blank ( '/v1.1/fake/images' ) #NEWLINE# response = request . get_response ( fakes . wsgi_app ( ) ) #NEWLINE# response_dict = json . loads ( response . body ) #NEWLINE# response_list = response_dict [ 'images' ] #NEWLINE# fixtures = copy . copy ( self . fixtures ) #NEWLINE# for image in fixtures : #NEWLINE# #INDENT# if ( not self . _applicable_fixture ( image , 'fake' ) ) : #NEWLINE# #INDENT# fixtures . remove ( image ) #NEWLINE# continue #NEWLINE# #UNINDENT# href = ( 'http://localhost/v1.1/fake/images/%s' % image [ 'id' ] ) #NEWLINE# bookmark = ( 'http://localhost/fake/images/%s' % response [ 'id' ] ) #NEWLINE# test_image = { #NEWLINE# #INDENT# 'id' : str ( image [ 'id' ] ) , #NEWLINE# 'name' : image [ 'name' ] , #NEWLINE# 'links' : [ { #NEWLINE# #INDENT# 'rel' : 'self' , #NEWLINE# 'href' : href , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'rel' : 'bookmark' , #NEWLINE# 'href' : bookmark , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertTrue ( ( test_image in response_list ) ) #NEWLINE# #UNINDENT# self . assertEqual ( len ( response_list ) , len ( fixtures ) )