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 Nov 25, 2023
1 parent 404e248 commit c00b681
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions tests/app/idp/idp/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@

from oauth2_provider.oauth2_validators import OAuth2Validator


# get_response is required for middlware, it doesn't need to do anything
# the way we're using it, so we just use a lambda that returns None
def get_response(): None
def get_response():
None


class CustomOAuth2Validator(OAuth2Validator):
def validate_silent_login(self, request) -> None:
Expand All @@ -16,7 +19,6 @@ def validate_silent_login(self, request) -> None:
# may need to modify this if you are using a different session
# middleware or auth backend.


session_cookie_name = settings.SESSION_COOKIE_NAME
HTTP_COOKIE = request.headers.get("HTTP_COOKIE")
COOKIES = HTTP_COOKIE.split("; ")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_authorization_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ def test_prompt_none_with_error(self):
self.oauth2_settings.PKCE_REQUIRED = False

query_data = {
"client_id": 'invalid',
"client_id": "invalid",
"response_type": "code",
"state": "random_state_string",
"scope": "read write",
Expand Down

0 comments on commit c00b681

Please sign in to comment.