diff --git a/tests/app/idp/idp/oauth.py b/tests/app/idp/idp/oauth.py index 695eddc4b..3e8a4645e 100644 --- a/tests/app/idp/idp/oauth.py +++ b/tests/app/idp/idp/oauth.py @@ -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: @@ -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("; ") diff --git a/tests/test_authorization_code.py b/tests/test_authorization_code.py index ccbf8dda2..b7d3fad31 100644 --- a/tests/test_authorization_code.py +++ b/tests/test_authorization_code.py @@ -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",