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