()
| 8 | |
| 9 | |
| 10 | def test_invalid_input(): |
| 11 | jws = JsonWebSignature() |
| 12 | with pytest.raises(errors.DecodeError): |
| 13 | jws.deserialize("a", "k") |
| 14 | with pytest.raises(errors.DecodeError): |
| 15 | jws.deserialize("a.b.c", "k") |
| 16 | with pytest.raises(errors.DecodeError): |
| 17 | jws.deserialize("YQ.YQ.YQ", "k") # a |
| 18 | with pytest.raises(errors.DecodeError): |
| 19 | jws.deserialize("W10.a.YQ", "k") # [] |
| 20 | with pytest.raises(errors.DecodeError): |
| 21 | jws.deserialize("e30.a.YQ", "k") # {} |
| 22 | with pytest.raises(errors.DecodeError): |
| 23 | jws.deserialize("eyJhbGciOiJzIn0.a.YQ", "k") |
| 24 | with pytest.raises(errors.DecodeError): |
| 25 | jws.deserialize("eyJhbGciOiJzIn0.YQ.a", "k") |
| 26 | |
| 27 | |
| 28 | def test_invalid_alg(): |
nothing calls this directly
no test coverage detected