MCPcopy
hub / github.com/authlib/authlib / test_serialize_json_empty_payload

Function test_serialize_json_empty_payload

tests/jose/test_jws.py:171–177  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

169
170
171def test_serialize_json_empty_payload():
172 jws = JsonWebSignature()
173 protected = {"alg": "HS256"}
174 header = {"protected": protected, "header": {"kid": "a"}}
175 s = jws.serialize_json(header, b"", "secret")
176 data = jws.deserialize_json(s, "secret")
177 assert data["payload"] == b""
178
179
180def test_fail_deserialize_json():

Callers

nothing calls this directly

Calls 3

serialize_jsonMethod · 0.95
deserialize_jsonMethod · 0.95
JsonWebSignatureClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…