You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
TestClient.authenticate(user) and AsyncTestClient.authenticate(user) to allow injecting an authenticated user directly into the ASGI scope during tests.
TestClient.logout() and AsyncTestClient.logout() to clear any previously injected authenticated user.
Automatic injection of the authenticated user into both scope["user"] and scope["state"]["user"] for HTTP and WebSocket connections, enabling clean authentication bypass in tests without monkeypatching.
Fixed
Settings inheritance now preserves typed fields from parent classes when type hint resolution falls back, allowing child settings classes to override inherited values without re-annotating fields.