def test_pick_wrong_alg():
    keys = KEYS()
    keys.load_dict(JWKS0)
    _jws = JWS("foobar", alg="RS256", kid="rsa1")  # should be RSA256
    _keys = _jws.pick_keys(keys, use="sig")
    assert len(_keys) == 0
def test_pick_use():
    keys = KEYS()
    keys.load_dict(JWK2)
    _jws = JWS("foobar", alg="RS256", kid="MnC_VZcATfM5pOYiJHMba9goEKY")
    _keys = _jws.pick_keys(keys, use="sig")
    assert len(_keys) == 1