Skip to content

Commit 1d73750

Browse files
committed
Fix tests for real
1 parent 9bae21d commit 1d73750

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/client/auth/extensions/test_client_credentials.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import jwt
44
import pytest
5+
from pydantic import AnyHttpUrl, AnyUrl
56

67
from mcp.client.auth.extensions.client_credentials import JWTParameters, RFC7523OAuthClientProvider
78
from mcp.shared.auth import OAuthClientInformationFull, OAuthClientMetadata, OAuthToken
@@ -27,6 +28,21 @@ async def set_client_info(self, client_info: OAuthClientInformationFull) -> None
2728
self._client_info = client_info
2829

2930

31+
@pytest.fixture
32+
def mock_storage():
33+
return MockTokenStorage()
34+
35+
36+
@pytest.fixture
37+
def client_metadata():
38+
return OAuthClientMetadata(
39+
client_name="Test Client",
40+
client_uri=AnyHttpUrl("https://example.com"),
41+
redirect_uris=[AnyUrl("http://localhost:3030/callback")],
42+
scope="read write",
43+
)
44+
45+
3046
@pytest.fixture
3147
def rfc7523_oauth_provider(client_metadata: OAuthClientMetadata, mock_storage: MockTokenStorage):
3248
async def redirect_handler(url: str) -> None:

0 commit comments

Comments
 (0)