Skip to content

Merge URLs properly on TestClient#2376

Merged
Kludex merged 2 commits intomasterfrom
merge-urls-properly
Dec 16, 2023
Merged

Merge URLs properly on TestClient#2376
Kludex merged 2 commits intomasterfrom
merge-urls-properly

Conversation

@Kludex
Copy link
Copy Markdown
Owner

@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
Copy Markdown
Owner 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
@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