def test_invalid_hash_alg(self): with pytest.raises(JWKError): key = jwk.HMACKey(hmac_key, 'RS512') with pytest.raises(JWKError): key = RSAKey(rsa_key, 'HS512') with pytest.raises(JWKError): key = ECKey(ec_key, 'RS512') # noqa: F841
def test_invalid_jwk(self): with pytest.raises(JWKError): key = jwk.HMACKey(rsa_key, 'HS256') with pytest.raises(JWKError): key = RSAKey(hmac_key, 'RS256') with pytest.raises(JWKError): key = ECKey(rsa_key, 'ES256') # noqa: F841