Skip to content

Commit 74e1b0b

Browse files
committed
set_token test
1 parent 34aaa13 commit 74e1b0b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_auth.py

+5
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,8 @@ def test_auth_jwt_expiry(client, db_name, root_password, secret):
139139
# Test correct error on token expiry (user).
140140
with assert_raises(JWTExpiredError) as err:
141141
db = client.db("_system", user_token=expired_token)
142+
143+
# Test set_token() with expired token.
144+
db = client.db("_system", user_token=generate_jwt(secret))
145+
with assert_raises(JWTExpiredError) as err:
146+
db.conn.set_token(expired_token)

0 commit comments

Comments
 (0)