From b113e58ab7aa6b9cddcb2ec46d46b711a3291b3a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Mon, 5 Jan 2026 03:43:53 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Auto=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_security_http_basic_default_realm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_security_http_basic_default_realm.py b/tests/test_security_http_basic_default_realm.py index 962c3006f..513651936 100644 --- a/tests/test_security_http_basic_default_realm.py +++ b/tests/test_security_http_basic_default_realm.py @@ -5,12 +5,15 @@ from fastapi.testclient import TestClient app = FastAPI() security = HTTPBasic() + @app.get("/users/me") def read_current_user(credentials: HTTPBasicCredentials = Depends(security)): return {"username": credentials.username, "password": credentials.password} + client = TestClient(app) + def test_security_http_basic_default_realm(): # 401 branch: should include default realm response = client.get("/users/me")