Skip to content

Commit e4124d7

Browse files
committed
Fix DeprecationWarnings by updating key type property usage in tests
1 parent 121abd4 commit e4124d7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/test_authorization_code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1867,7 +1867,7 @@ def test_id_token(self):
18671867

18681868
# Check decoding JWT using HS256
18691869
key = self.application.jwk_key
1870-
assert key.key_type == "oct"
1870+
assert key.kty == "oct"
18711871
jwt_token = jwt.JWT(key=key, jwt=content["id_token"])
18721872
claims = json.loads(jwt_token.claims)
18731873
assert claims["sub"] == "1"

tests/test_models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ def test_clear_expired_id_tokens(oauth2_settings, oidc_tokens, rf):
563563
def test_application_key(oauth2_settings, application):
564564
# RS256 key
565565
key = application.jwk_key
566-
assert key.key_type == "RSA"
566+
assert key.kty == "RSA"
567567

568568
# RS256 key, but not configured
569569
oauth2_settings.OIDC_RSA_PRIVATE_KEY = None
@@ -574,7 +574,7 @@ def test_application_key(oauth2_settings, application):
574574
# HS256 key
575575
application.algorithm = Application.HS256_ALGORITHM
576576
key = application.jwk_key
577-
assert key.key_type == "oct"
577+
assert key.kty == "oct"
578578

579579
# No algorithm
580580
application.algorithm = Application.NO_ALGORITHM

0 commit comments

Comments
 (0)