Skip to content
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

maint: remove root_path usage in TestClient #207

Closed
isabelizimm opened this issue Jan 30, 2024 · 0 comments · Fixed by #209
Closed

maint: remove root_path usage in TestClient #207

isabelizimm opened this issue Jan 30, 2024 · 0 comments · Fixed by #209
Labels

Comments

@isabelizimm
Copy link
Contributor

With fastapi==0.109.0/ starlette==0.35.0, there have been breaking changes to how root_path is used within APIs. While vetiver doesn't use this directly, it is the way test paths are set inside TestClient, so many of our tests are failing.

from encode/starlette#2400

... if it [root_path] is set, it will be passed to the ASGI apps, that will internally extract/remove it from the paths. But clients communicating with those ASGI apps, if they are indeed mounted at the defined root_path, would have to communicate with it using the root_path prefix. So this PR updates the client to actually require/use that, clients created with root_path would need to be used the same way that clients communicating with those ASGI apps mounted at some prefix path.

@isabelizimm isabelizimm added bug Something isn't working testing and removed bug Something isn't working labels Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant