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

Function test_invalid_alg

tests/jose/test_jws.py:28–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26
27
28def test_invalid_alg():
29 jws = JsonWebSignature()
30 with pytest.raises(errors.UnsupportedAlgorithmError):
31 jws.deserialize(
32 "eyJhbGciOiJzIn0.YQ.YQ",
33 "k",
34 )
35 with pytest.raises(errors.MissingAlgorithmError):
36 jws.serialize({}, "", "k")
37 with pytest.raises(errors.UnsupportedAlgorithmError):
38 jws.serialize({"alg": "s"}, "", "k")
39
40
41def test_bad_signature():

Callers

nothing calls this directly

Calls 3

deserializeMethod · 0.95
serializeMethod · 0.95
JsonWebSignatureClass · 0.90

Tested by

no test coverage detected