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

Method test_header_invalid_padding

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

Source from the content-addressed store, hash-verified

52 jws.verify(token, "secret", ["HS256"])
53
54 def test_header_invalid_padding(self):
55 token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9A.eyJhIjoiYiJ9.jiMyrsmD8AoHWeQgmxZ5yq8z0lXS67_QGs52AzC8Ru8"
56 with pytest.raises(JWSError):
57 jws.verify(token, "secret", ["HS256"])
58
59 def test_header_not_json(self):
60 token = "dGVzdA.eyJhIjoiYiJ9.jiMyrsmD8AoHWeQgmxZ5yq8z0lXS67_QGs52AzC8Ru8"

Callers

nothing calls this directly

Calls 1

verifyMethod · 0.45

Tested by

no test coverage detected