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

Add client parameter to TestClient #2810

Merged
merged 12 commits into from
Dec 28, 2024

Conversation

iudeen
Copy link
Contributor

@iudeen iudeen commented Dec 26, 2024

Summary

Fixes #2295

Added client and port parameter to TestClient

Copy link
Member

@Kludex Kludex left a comment

Choose a reason for hiding this comment

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

On the "how to test", just see the test_testclient.py, and add an entry with a different client, and check the scope["client"] on the endpoint.

starlette/testclient.py Outdated Show resolved Hide resolved
starlette/testclient.py Outdated Show resolved Hide resolved
@iudeen iudeen marked this pull request as ready for review December 26, 2024 09:02
@iudeen iudeen requested a review from Kludex December 26, 2024 09:02
@iudeen iudeen changed the title fix: add client as paramter to TestClient feat: add client as paramter to TestClient Dec 26, 2024
@Kludex Kludex changed the title feat: add client as paramter to TestClient Add client parameter to TestClient Dec 26, 2024
docs/testclient.md Outdated Show resolved Hide resolved
@Kludex
Copy link
Member

Kludex commented Dec 28, 2024

Thanks! :)

@Kludex Kludex enabled auto-merge (squash) December 28, 2024 04:56
@Kludex Kludex merged commit 2006662 into encode:master Dec 28, 2024
6 checks passed
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.

invalid format of client's host in testclient
2 participants