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

Function test_invalid_values

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

Source from the content-addressed store, hash-verified

225
226
227def test_invalid_values():
228 id_token = jwt.encode({"alg": "HS256"}, {"iss": "foo"}, "k")
229 claims_options = {"iss": {"values": ["bar"]}}
230 claims = jwt.decode(id_token, "k", claims_options=claims_options)
231 with pytest.raises(errors.InvalidClaimError):
232 claims.validate()
233 claims.options = {"iss": {"value": "bar"}}
234 with pytest.raises(errors.InvalidClaimError):
235 claims.validate()
236
237
238def test_validate_expected_issuer_received_None():

Callers

nothing calls this directly

Calls 3

encodeMethod · 0.80
decodeMethod · 0.80
validateMethod · 0.45

Tested by

no test coverage detected