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

Class TestLoad

tests/test_jws.py:381–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379
380
381class TestLoad:
382 def test_header_not_mapping(self):
383 token = "WyJ0ZXN0Il0.eyJhIjoiYiJ9.jiMyrsmD8AoHWeQgmxZ5yq8z0lXS67_QGs52AzC8Ru8"
384 with pytest.raises(JWSError):
385 jws.verify(token, "secret", ["HS256"])
386
387 def test_claims_not_mapping(self):
388 token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.WyJ0ZXN0Il0.jiMyrsmD8AoHWeQgmxZ5yq8z0lXS67_QGs52AzC8Ru8"
389 with pytest.raises(JWSError):
390 jws.verify(token, "secret", ["HS256"])
391
392 def test_signature_padding(self):
393 token = "eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9.eyJoZWxsbyI6ICJ3b3JsZCJ9.aatvagLDLoaiJKxOKqpBXSEGy7SYSifZhjntgm9ctpyj8"
394 with pytest.raises(JWSError):
395 jws.verify(token, "secret", ["HS256"])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…