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

Merge URLs properly on TestClient #2376

Merged
merged 2 commits into from
Dec 16, 2023
Merged

Merge URLs properly on TestClient #2376

merged 2 commits into from
Dec 16, 2023

Conversation

Kludex
Copy link
Sponsor Member

@Kludex Kludex commented Dec 16, 2023

@Kludex Kludex requested a review from a team December 16, 2023 13:36
Comment on lines +362 to +365
app = Starlette(routes=[Route("/api/v1/bar", endpoint=homepage)])
client = test_client_factory(app, base_url="http://testserver/api/v1/")
response = client.get("/bar")
assert response.text == "/api/v1/bar"
Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test fails on master, FYI.

@Kludex Kludex merged commit efa03eb into master Dec 16, 2023
5 checks passed
@Kludex Kludex deleted the merge-urls-properly branch December 16, 2023 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestClient doesn't merge urls in the same way as the httpx client, and I think it should.
2 participants