Skip to content

Commit 1a9a07b

Browse files
committed
Throws an exception when unknown key type rather then not returning any key.
1 parent 573f494 commit 1a9a07b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_06_jws.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,8 +660,8 @@ def test_pick_use():
660660
def test_pick_wrong_alg():
661661
keys = KeyBundle(JWKS_b)
662662
_jws = JWS("foobar", alg="EC256", kid="rsa1")
663-
_keys = _jws.pick_keys(keys, use="sig")
664-
assert len(_keys) == 0
663+
with pytest.raises(ValueError):
664+
_keys = _jws.pick_keys(keys, use="sig")
665665

666666

667667
def test_dj_usage():

0 commit comments

Comments
 (0)