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

Method test_zip_header_present_when_provided

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

Source from the content-addressed store, hash-verified

488
489 @pytest.mark.skipif(AESKey is None, reason="No AES backend")
490 def test_zip_header_present_when_provided(self):
491 enc = ALGORITHMS.A256CBC_HS512
492 alg = ALGORITHMS.RSA_OAEP_256
493 encrypted = jwe.encrypt(b"Text", PUBLIC_KEY_PEM, enc, alg, zip=ZIPS.DEF)
494 header = json.loads(base64url_decode(encrypted.split(b".")[0]))
495 assert header["zip"] == ZIPS.DEF
496
497 @pytest.mark.skipif(AESKey is None, reason="No AES backend")
498 def test_zip_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