getsentry / responses

A utility for mocking out the Python Requests library.
Apache License 2.0
4.14k stars 354 forks source link

Feature: Simulate timeout of request #660

Closed Seluj78 closed 1 year ago

Seluj78 commented 1 year ago

I would like to simulate a timeout on a request with responses. Is it possible to do it already ?

markstory commented 1 year ago

Have you tried raising a timeout error from you response mock by using a callback? Or using an exception as the response body?

Seluj78 commented 1 year ago

Yes it worked with the exception as the body ! Thanks !