I am using the tenacity library to use its @retry decorator.
@retry
I am using this to make a function which makes a HTTP-request \"repeat\" multiple times in
The solution came from the maintainer of tenacity himself in this Github issue: https://github.com/jd/tenacity/issues/106
You can simply change the wait function temporarily for your unit test:
from tenacity import wait_none func.retry.wait = wait_none()