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

Function test_init_algorithms

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

Source from the content-addressed store, hash-verified

22
23
24def test_init_algorithms():
25 _jwt = JsonWebToken(["RS256"])
26 with pytest.raises(UnsupportedAlgorithmError):
27 _jwt.encode({"alg": "HS256"}, {}, "k")
28
29 _jwt = JsonWebToken("RS256")
30 with pytest.raises(UnsupportedAlgorithmError):
31 _jwt.encode({"alg": "HS256"}, {}, "k")
32
33
34@pytest.mark.parametrize("prefix", ["", "\n", " \t\r\n", "# public key\n", "\ufeff"])

Callers

nothing calls this directly

Calls 2

encodeMethod · 0.95
JsonWebTokenClass · 0.90

Tested by

no test coverage detected