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

Fix ASGI test #370

Merged
merged 1 commit into from
Jan 24, 2024
Merged

Fix ASGI test #370

merged 1 commit into from
Jan 24, 2024

Conversation

imjoehaines
Copy link
Member

Goal

The client scope was removed in encode/starlette#2377 when using the TestClient, which means we no longer get a clientIp key in request metadata when running unit tests

This is still set outside of a testing environment and is still covered by a different unit test:

self.assertEqual('testclient', request['clientIp'])

The 'client' scope was removed in
encode/starlette#2377, which means we can't read
the client IP from it in unit tests
@imjoehaines imjoehaines merged commit 8c650a8 into next Jan 24, 2024
20 checks passed
@imjoehaines imjoehaines deleted the fix-asgi-test branch January 24, 2024 12:09
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.

None yet

2 participants