Switch RFC7523OAuthClientProvider warning to MCPDeprecationWarning (#2996)
This commit is contained in:
parent
5b2713d40c
commit
cc596195bb
1 changed files with 6 additions and 3 deletions
|
|
@ -14,6 +14,7 @@ from mcp.client.auth.extensions.client_credentials import (
|
|||
static_assertion_provider,
|
||||
)
|
||||
from mcp.shared.auth import OAuthClientInformationFull, OAuthClientMetadata, OAuthToken
|
||||
from mcp.shared.exceptions import MCPDeprecationWarning
|
||||
|
||||
# See test_index.py for why this is a per-module mark and not a conftest hook.
|
||||
pytestmark = [pytest.mark.anyio, pytest.mark.filterwarnings("error::mcp.MCPDeprecationWarning")]
|
||||
|
|
@ -105,7 +106,7 @@ async def test_the_one_more_provider_is_private_key_jwt() -> None:
|
|||
|
||||
async def test_the_page_does_not_count_the_deprecated_provider() -> None:
|
||||
"""Why the `!!! info` says *one* more provider: `RFC7523OAuthClientProvider` warns on construction."""
|
||||
with pytest.warns(DeprecationWarning, match="RFC7523OAuthClientProvider is deprecated"):
|
||||
with pytest.warns(MCPDeprecationWarning, match="RFC7523OAuthClientProvider is deprecated"):
|
||||
RFC7523OAuthClientProvider(
|
||||
server_url="http://localhost:8001/mcp",
|
||||
client_metadata=tutorial001.oauth.context.client_metadata,
|
||||
|
|
|
|||
Loading…
Reference in a new issue