Skip to content

Commit d4d742c

Browse files
committed
fix: create new auth instance after config change in test_verified_token
The test was failing on CI because it was using an auth instance created with the old configuration. Now it creates a new instance after updating the config.
1 parent ea536a2 commit d4d742c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/test_decode_token.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,11 @@ def test_verified_token(client, encoded_token, authorize_fixture):
104104
),
105105
)
106106

107+
# Create new auth instance with updated config
108+
auth2 = JWTHarmony()
107109
user = SimpleUser(id='test')
108-
access_token = auth.create_access_token(user_claims=user)
109-
refresh_token = auth.create_refresh_token(user_claims=user)
110+
access_token = auth2.create_access_token(user_claims=user)
111+
refresh_token = auth2.create_refresh_token(user_claims=user)
110112
time.sleep(2)
111113
# JWT payload is now expired
112114
# But with some leeway, it will still validate

0 commit comments

Comments
 (0)