Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 20, 2024
1 parent 8071830 commit af20457
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion oauthenticator/tests/mocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def setup_oauth_mock(
user_path=None,
token_type='Bearer',
token_request_style='post',
scope=""
scope="",
):
"""setup the mock client for OAuth
Expand Down
12 changes: 5 additions & 7 deletions oauthenticator/tests/test_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def generic_client(client):
host='generic.horse',
access_token_path='/oauth/access_token',
user_path='/oauth/userinfo',
scope='basic'
scope='basic',
)
return client

Expand Down Expand Up @@ -202,13 +202,11 @@ async def test_generic_data(get_authenticator, generic_client):


@mark.parametrize(
["requested_scopes", "allowed"],
[
(["advanced"], False),
(["basic"], True)
]
["requested_scopes", "allowed"], [(["advanced"], False), (["basic"], True)]
)
async def test_required_scopes(get_authenticator, generic_client, requested_scopes, allowed):
async def test_required_scopes(
get_authenticator, generic_client, requested_scopes, allowed
):
c = Config()
c.GenericOAuthenticator.required_scopes = requested_scopes
c.GenericOAuthenticator.scope = list(requested_scopes)
Expand Down

0 comments on commit af20457

Please sign in to comment.