Skip to content

Fix DeprecationWarnings by updating key type property usage in tests #1590

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion tests/test_authorization_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -1867,7 +1867,7 @@ def test_id_token(self):

# Check decoding JWT using HS256
key = self.application.jwk_key
assert key.key_type == "oct"
assert key.kty == "oct"
jwt_token = jwt.JWT(key=key, jwt=content["id_token"])
claims = json.loads(jwt_token.claims)
assert claims["sub"] == "1"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ def test_clear_expired_id_tokens(oauth2_settings, oidc_tokens, rf):
def test_application_key(oauth2_settings, application):
# RS256 key
key = application.jwk_key
assert key.key_type == "RSA"
assert key.kty == "RSA"

# RS256 key, but not configured
oauth2_settings.OIDC_RSA_PRIVATE_KEY = None
Expand All @@ -574,7 +574,7 @@ def test_application_key(oauth2_settings, application):
# HS256 key
application.algorithm = Application.HS256_ALGORITHM
key = application.jwk_key
assert key.key_type == "oct"
assert key.kty == "oct"

# No algorithm
application.algorithm = Application.NO_ALGORITHM
Expand Down
Loading