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

Method test_invalid_algorithm

tests/test_jws.py:44–47  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

42 jwk.HMACKey.verify = old_jwk_verify
43
44 def test_invalid_algorithm(self):
45 token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhIjoiYiJ9.jiMyrsmD8AoHWeQgmxZ5yq8z0lXS67_QGs52AzC8Ru8"
46 with pytest.raises(JWSError):
47 jws.verify(token, "secret", [None])
48
49 def test_not_enough_segments(self):
50 token = "eyJhIjoiYiJ9.jiMyrsmD8AoHWeQgmxZ5yq8z0lXS67_QGs52AzC8Ru8"

Callers

nothing calls this directly

Calls 1

verifyMethod · 0.45

Tested by

no test coverage detected