(self, jws: PyJWS, payload: bytes)
| 181 | assert str(exception) == "Invalid header string: must be a json object" |
| 182 | |
| 183 | def test_encode_default_algorithm(self, jws: PyJWS, payload: bytes) -> None: |
| 184 | msg = jws.encode(payload, "secret") |
| 185 | decoded = jws.decode_complete(msg, "secret", algorithms=["HS256"]) |
| 186 | assert decoded == { |
| 187 | "header": {"alg": "HS256", "typ": "JWT"}, |
| 188 | "payload": payload, |
| 189 | "signature": ( |
| 190 | b"H\x8a\xf4\xdf3:\xe1\xac\x16E\xd3\xeb\x00\xcf\xfa\xd5\x05\xac" |
| 191 | b"e\xc8@\xb6\x00\xd5\xde\x9aa|s\xcfZB" |
| 192 | ), |
| 193 | } |
| 194 | |
| 195 | def test_encode_algorithm_param_should_be_case_sensitive( |
| 196 | self, jws: PyJWS, payload: bytes |
nothing calls this directly
no test coverage detected