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

Method test_kid_header_present_when_provided

tests/test_jwe.py:514–519  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

512
513 @pytest.mark.skipif(AESKey is None, reason="No AES backend")
514 def test_kid_header_present_when_provided(self):
515 enc = ALGORITHMS.A256CBC_HS512
516 alg = ALGORITHMS.RSA_OAEP_256
517 encrypted = jwe.encrypt("Text", PUBLIC_KEY_PEM, enc, alg, kid="expected")
518 header = json.loads(base64url_decode(encrypted.split(b".")[0]))
519 assert header["kid"] == "expected"
520
521 @pytest.mark.skipif(AESKey is None, reason="No AES backend")
522 def test_kid_header_not_present_when_not_provided(self):

Callers

nothing calls this directly

Calls 2

base64url_decodeFunction · 0.90
encryptMethod · 0.45

Tested by

no test coverage detected