def test_quota_exceeded(self):

        def mock_call_geocoder(*args, **kwargs):
            """
            Mock API call to return bad response.
            """
            return {
                "geocoding_results": {
                    "STATUS": {
                        "access": "OVER_QUERY_LIMIT",
                        "status": "FAILED, ACCESS_DENIED"
                    }
                }
            }
        self.geocoder._call_geocoder = types.MethodType(
            mock_call_geocoder,
            self.geocoder
        )

        with self.assertRaises(exc.GeocoderQuotaExceeded):
            self.geocoder.geocode('435 north michigan ave, chicago il 60611')
GeocodeFarm quota exceeded
dataset/ETHPy150Open geopy/geopy/test/geocoders/geocodefarm.py/GeocodeFarmTestCase.test_quota_exceeded