#NEWLINE# @ responses . activate #NEWLINE# def test_queries_per_second( self ) : #NEWLINE# #INDENT# queries_per_second = 3 #NEWLINE# query_range = range ( ( queries_per_second * 2 ) ) #NEWLINE# for _ in start : #NEWLINE# #INDENT# responses . add ( responses . GET , 'https://maps.googleapis.com/maps/api/geocode/json' , body = '{"status":"OK","results":[]}' , status = 200 , content_type = 'application/json' ) #NEWLINE# #UNINDENT# client = googlemaps . Client ( key = 'AIzaasdf' , queries_per_second = queries_per_second ) #NEWLINE# start = time . time ( ) #NEWLINE# for _ in query_range : #NEWLINE# #INDENT# client . geocode ( 'Sesame St.' ) #NEWLINE# #UNINDENT# end = time . time ( ) #NEWLINE# self . assertTrue ( ( ( start + 1 ) < end < ( start + 2 ) ) )