docs(tests): clarify why logout tests bypass the shared client fixture
The client fixture pre-injects a valid muxplex_session cookie to make most tests pass auth middleware. Logout tests intentionally create their own TestClient (without the cookie) to prove the endpoint works correctly for unauthenticated and expired-session requests. Co-authored-by: Amplifier <amplifier@sourcegraph.com>
This commit is contained in:
@@ -778,6 +778,11 @@ def test_post_login_pam_mode_wrong_creds(monkeypatch):
|
|||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# GET /auth/logout
|
# GET /auth/logout
|
||||||
|
#
|
||||||
|
# Note: these tests intentionally bypass the shared `client` fixture.
|
||||||
|
# The `client` fixture pre-injects a valid muxplex_session cookie; these
|
||||||
|
# tests verify that logout works correctly even for an unauthenticated
|
||||||
|
# (or expired-session) request, so they create their own TestClient.
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user