Skip to content

Fix incorrect HTTP status code in test_authorized_dependency_unauthorized docstring #931

@coderabbitai

Description

@coderabbitai

Description

The docstring for the test_authorized_dependency_unauthorized test function in tests/unit/app/endpoints/test_authorized.py (line 50) incorrectly states that the test verifies "HTTPException with 403" when it actually verifies status code 401.

Details

  • File: tests/unit/app/endpoints/test_authorized.py
  • Line: 50
  • Current: "Test that auth dependency raises HTTPException with 403 for unauthorized access."
  • Expected: "Test that auth dependency raises HTTPException with 401 for unauthorized access."

The test body correctly asserts status code 401 (lines 69 and 80), which is appropriate for authentication failures (missing or malformed Authorization headers). The docstring summary line needs to be updated to match.

Context

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions