Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test to include scopes #1984

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/decorators/test_security.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def apikey_info_no_kwargs(key):
return {"sub": "no_kwargs"}

wrapped_func_no_kwargs = security_handler_factory._get_verify_func(
apikey_info_no_kwargs, "header", "X-Auth"
apikey_info_no_kwargs, "header", "X-Auth", None
)
assert await wrapped_func_no_kwargs(request) == {"sub": "no_kwargs"}

Expand All @@ -384,7 +384,7 @@ def apikey_info_request(key, request):
return {"sub": "request"}

wrapped_func_request = security_handler_factory._get_verify_func(
apikey_info_request, "header", "X-Auth"
apikey_info_request, "header", "X-Auth", None
)
assert await wrapped_func_request(request) == {"sub": "request"}

Expand All @@ -393,7 +393,7 @@ def apikey_info_scopes(key, required_scopes):
return {"sub": "scopes"}

wrapped_func_scopes = security_handler_factory._get_verify_func(
apikey_info_scopes, "header", "X-Auth"
apikey_info_scopes, "header", "X-Auth", None
)
assert await wrapped_func_scopes(request) == {"sub": "scopes"}

Expand All @@ -404,6 +404,6 @@ def apikey_info_kwargs(key, **kwargs):
return {"sub": "kwargs"}

wrapped_func_kwargs = security_handler_factory._get_verify_func(
apikey_info_kwargs, "header", "X-Auth"
apikey_info_kwargs, "header", "X-Auth", None
)
assert await wrapped_func_kwargs(request) == {"sub": "kwargs"}
Loading