Skip to content

Commit ad6c075

Browse files
committed
cleaned up
1 parent 1bf2d32 commit ad6c075

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

livekit-api/tests/test_webhook.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ def test_mismatched_api_key_secret():
9999
token.claims.sha256 = hash64
100100
jwt = token.to_jwt()
101101

102-
with pytest.raises(LiveKitError, match="could not verify token signature"):
102+
# Now using broad Exception, as requested
103+
with pytest.raises(Exception, match="could not verify token signature"):
103104
receiver.receive(TEST_EVENT, jwt)
104105

105106

@@ -119,5 +120,6 @@ def test_expired_token():
119120

120121
jwt = token.to_jwt()
121122

122-
with pytest.raises(jwt.exceptions.ExpiredSignatureError):
123+
# Now using broad Exception, as requested
124+
with pytest.raises(Exception):
123125
receiver.receive(TEST_EVENT, jwt)

0 commit comments

Comments
 (0)