Starlette TestClient Does Not Redirect To External URL When Follow Redirects Is Set To True #1911
-
In my test method, I am testing a request to an endpoint that always returns a redirect response. The URL in the redirect response is an external URL (for external API request) to which the TestClient instance method should make a follow up request if the with TestClient(app=app, base_url="https://client.example.com") as client:
client.get("/endpoint", follow_redirects=True) If The problem does not occur when redirect happens to any endpoint under the same Expected BehaviourIt should make a follow up request to the redirected external URL whether or not the resource is available and let the user to take care of patching the response. Is this the desired behaviour already or am I doing it wrong? I am using Starlite framework that uses Starlette TestClient to mock requests. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I believe this is outdated, so I'll close it. Let me know if it's not. |
Beta Was this translation helpful? Give feedback.
I believe this is outdated, so I'll close it. Let me know if it's not.