-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot mock 5xx responses #14
Comments
I started digging deeper and found the error message is actually from Req. I'm in the process of attempting to switch a project away from Tesla/Tesla.Mock to Req/TestServer |
I have the solution. If your code expects to be able to do intelligent handling of 408/429/5xx responses you must pass Req is batteries included, but this is more than I expected 🥲 Sorry for the noise, hopefully someone else finds this useful. |
Yeah, by default req will retry four times, so either you'll have to add four expectations (could be a small helper function you wrap around |
If I try to mock a 5xx response it blows up the entire test. I'm using the Bandit adapter.
e.g.,
The text was updated successfully, but these errors were encountered: