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

Method test_wrong_key

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

Source from the content-addressed store, hash-verified

117 jws.verify(token, "secret", ALGORITHMS.HS384)
118
119 def test_wrong_key(self, payload):
120 token = jws.sign(payload, "secret", algorithm=ALGORITHMS.HS256)
121 with pytest.raises(JWSError):
122 jws.verify(token, "another", ALGORITHMS.HS256)
123
124 def test_unsupported_alg(self, payload):
125 with pytest.raises(JWSError):

Callers

nothing calls this directly

Calls 2

signMethod · 0.45
verifyMethod · 0.45

Tested by

no test coverage detected