MCPcopy Create free account
hub / github.com/mpdavis/python-jose / test_wrong_alg

Method test_wrong_alg

tests/test_jws.py:114–117  ·  view source on GitHub ↗
(self, payload)

Source from the content-addressed store, hash-verified

112 assert jws.verify(token, "secret", ALGORITHMS.HS512) == payload
113
114 def test_wrong_alg(self, payload):
115 token = jws.sign(payload, "secret", algorithm=ALGORITHMS.HS256)
116 with pytest.raises(JWSError):
117 jws.verify(token, "secret", ALGORITHMS.HS384)
118
119 def test_wrong_key(self, payload):
120 token = jws.sign(payload, "secret", algorithm=ALGORITHMS.HS256)

Callers

nothing calls this directly

Calls 2

signMethod · 0.45
verifyMethod · 0.45

Tested by

no test coverage detected