Skip to content

Commit 7848ad4

Browse files
committed
test(identity): pin signature failure in wrong-key blocking token test
The bare pytest.raises passed for any InvalidAuthBlockingTokenError, including an audience rejection, so it did not pin what its name says.
1 parent 34484f6 commit 7848ad4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tests/test_token_verifier.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,5 @@ def test_rejects_wrong_issuer(app, signing_key):
118118

119119
def test_rejects_token_signed_by_another_key(app):
120120
other_key = rsa.generate_private_key(public_exponent=65537, key_size=2048)
121-
with pytest.raises(token_verifier.InvalidAuthBlockingTokenError):
121+
with pytest.raises(token_verifier.InvalidAuthBlockingTokenError, match="signature"):
122122
_verify(app, _token(other_key, CLOUDFUNCTIONS_AUDIENCE))

0 commit comments

Comments
 (0)