Skip to content
This repository was archived by the owner on Jun 9, 2024. It is now read-only.

Commit 82568f6

Browse files
committed
Fix not working test
1 parent cc85255 commit 82568f6

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tests/pastaporto/test_tokens.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ async def _():
8181
@test("Generate a service to service token")
8282
async def _():
8383
with time_machine.travel("2021-11-13 18:41:10", tick=False):
84-
8584
token = generate_service_to_service_token("secret", issuer="me", audience="you")
8685

87-
assert (
88-
token
89-
== "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJtZSIsImF1ZCI6InlvdSIsImlhdCI6MTYzNjgyODg3MCwiZXhwIjoxNjM2ODI4OTMwfQ.LnS-GDGazo6q5-54h9oGCmixRwA84QJX7I-TnU3gEvI"
90-
)
86+
with time_machine.travel("2021-11-13 18:41:50", tick=False):
87+
decode_service_to_service_token(token, secret="secret", issuer="me", audience="you")
88+
89+
with time_machine.travel("2021-11-13 18:43:10", tick=False), raises(jwt.ExpiredSignatureError):
90+
decode_service_to_service_token(token, secret="secret", issuer="me", audience="you")
9191

9292

9393
@test("Secret is required when creating a service-to-service token")

0 commit comments

Comments
 (0)