Skip to content

test(security): add test coverage for OAuth2AuthorizationCodeBearer with auto_error=False - #16082

Closed
amir-rezaei wants to merge 1 commit into
fastapi:masterfrom
amir-rezaei:test/oauth2-authorization-code-bearer-auto-error-false
Closed

amir-rezaei wants to merge 1 commit into
fastapi:masterfrom
amir-rezaei:test/oauth2-authorization-code-bearer-auto-error-false

Conversation

@amir-rezaei

Copy link
Copy Markdown

Description

This PR adds test coverage for OAuth2AuthorizationCodeBearer when auto_error=False.

Details

  • Removes # pragma: nocover in fastapi/security/oauth2.py and adds test_auto_error_false() to tests/test_security_oauth2_authorization_code_bearer.py.

@codspeed

codspeed Bot commented Jul 27, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 24 untouched benchmarks


Comparing amir-rezaei:test/oauth2-authorization-code-bearer-auto-error-false (626ada1) with master (98b12fe)

Open in CodSpeed

@YuriiMotov

Copy link
Copy Markdown
Member

@amir-rezaei, please, stop opening duplicate PRs!
This one is a duplicate of #15859

@YuriiMotov YuriiMotov closed this Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants