| 379 | |
| 380 | |
| 381 | class 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"]) |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…