I am using the tenacity library to use its @retry
decorator.
I am using this to make a function which makes a HTTP-request \"repeat\" multiple times in
You can use unittest.mock module to mock some elements of tentacity library.
In your case all decorators you use are classes e.g. retry
is a decorator class defined here. So it might be little bit tricky, but I think trying to
mock.patch('tentacity.wait.wait_random_exponential.__call__', ...)
may help.