Skip to content

Commit

Permalink
Fix test to include scopes (#1984)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbeSneyders authored Oct 24, 2024
1 parent c89e2d2 commit 8cff996
Showing 1 changed file with 4 additions and 4 deletions.
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"}

0 comments on commit 8cff996

Please sign in to comment.