MCPcopy Create free account
hub / github.com/authlib/authlib / test_encode_datetime

Function test_encode_datetime

tests/jose/test_jwt.py:203–207  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

201
202
203def test_encode_datetime():
204 now = datetime.datetime.now(tz=datetime.timezone.utc)
205 id_token = jwt.encode({"alg": "HS256"}, {"exp": now}, "k")
206 claims = jwt.decode(id_token, "k")
207 assert isinstance(claims.exp, int)
208
209
210def test_validate_essential_claims():

Callers

nothing calls this directly

Calls 2

encodeMethod · 0.80
decodeMethod · 0.80

Tested by

no test coverage detected