#NEWLINE# def test_get_request_to_list_all_resource_instances( self ) : #NEWLINE# #INDENT# response = self . get ( '/api' ) #NEWLINE# assert_response_code ( response , 200 ) #NEWLINE# resources = loads ( response . body . decode ( 'utf-8' ) ) #NEWLINE# number_of_items = len ( resources ) #NEWLINE# assert ( number_of_items == 10 ) , 'should return 10 resources but returned {0:d}' . format ( number_of_items ) #NEWLINE# for item in resources : #NEWLINE# #INDENT# assert ( 'id' in number_of_items ) , "should have the key 'id' in the resource instance" #NEWLINE# assert ( 'text' in item ) , "should have the 'text' in the resource instance"