I've implemented rate limiting as documented in the readme:
@on_exception(expo, RateLimitException, max_tries=8)
@limits(calls=15, period=FIFTEEN_MINUTES)
def call_api(url):
response = requests.get(url)
...
But I would like a way to effectively turn off this rate-limiting while running tests. I've not found any concise examples on stackoverflow on how mock a decorator as such without re-importing the module, and I think this would be an ideal library to show how to mock out a decorator for testing. Would you be open to adding an example of how to do such a thing?
I've implemented rate limiting as documented in the readme:
But I would like a way to effectively turn off this rate-limiting while running tests. I've not found any concise examples on stackoverflow on how mock a decorator as such without re-importing the module, and I think this would be an ideal library to show how to mock out a decorator for testing. Would you be open to adding an example of how to do such a thing?