Skip to content

Commit 859475b

Browse files
committed
Add custom encode/decode callback tests for refresh tokens
1 parent b0d9c9b commit 859475b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_decode_tokens.py

+6
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ def get_encode_key_1(identity):
151151
with app.test_request_context():
152152
token = create_access_token('username')
153153
decode_token(token)
154+
with pytest.raises(InvalidSignatureError):
155+
with app.test_request_context():
156+
token = create_refresh_token('username')
157+
decode_token(token)
154158

155159
@jwtM.decode_key_loader
156160
def get_decode_key_1(claims):
@@ -160,3 +164,5 @@ def get_decode_key_1(claims):
160164
with app.test_request_context():
161165
token = create_access_token('username')
162166
decode_token(token)
167+
token = create_refresh_token('username')
168+
decode_token(token)

0 commit comments

Comments
 (0)