From cf79d9fc9ffb8ec0c3679871c044489043a06f40 Mon Sep 17 00:00:00 2001 From: Brian Krabach Date: Sat, 28 Mar 2026 22:36:09 -0700 Subject: [PATCH] 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 --- muxplex/tests/test_api.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/muxplex/tests/test_api.py b/muxplex/tests/test_api.py index 03dae28..189a6df 100644 --- a/muxplex/tests/test_api.py +++ b/muxplex/tests/test_api.py @@ -778,6 +778,11 @@ def test_post_login_pam_mode_wrong_creds(monkeypatch): # --------------------------------------------------------------------------- # 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. # ---------------------------------------------------------------------------