Skip to content

Commit d6b8d58

Browse files
committed
tests
1 parent c7a361e commit d6b8d58

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

tests/client/test_auth.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -858,9 +858,7 @@ async def mock_redirect_handler(url: str) -> None:
858858
with patch(
859859
"mcp.client.auth.secrets.compare_digest", return_value=False
860860
) as mock_compare:
861-
with pytest.raises(
862-
Exception, match="State parameter mismatch - possible CSRF attack"
863-
):
861+
with pytest.raises(Exception, match="State parameter mismatch"):
864862
await oauth_provider._perform_oauth_flow()
865863

866864
# Verify constant-time comparison was used
@@ -885,9 +883,7 @@ async def mock_redirect_handler(url: str) -> None:
885883

886884
oauth_provider.redirect_handler = mock_redirect_handler
887885

888-
with pytest.raises(
889-
Exception, match="State parameter is missing - possible CSRF attack"
890-
):
886+
with pytest.raises(Exception, match="State parameter mismatch"):
891887
await oauth_provider._perform_oauth_flow()
892888

893889
@pytest.mark.anyio

0 commit comments

Comments
 (0)