Skip to content

Commit 04e80b5

Browse files
committed
test: cover null redirect uri registration
1 parent 340fdaa commit 04e80b5

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

tests/server/mcpserver/auth/test_auth_integration.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,20 @@ async def test_client_registration_allows_loopback_redirect_uri(self, test_clien
671671
assert response.status_code == 201, response.content
672672
assert response.json()["redirect_uris"] == ["http://localhost:3030/callback"]
673673

674+
@pytest.mark.anyio
675+
async def test_client_registration_allows_null_redirect_uris(self, test_client: httpx.AsyncClient):
676+
client_metadata = {
677+
"redirect_uris": None,
678+
"client_name": "No Redirect Client",
679+
}
680+
681+
response = await test_client.post(
682+
"/register",
683+
json=client_metadata,
684+
)
685+
assert response.status_code == 201, response.content
686+
assert "redirect_uris" not in response.json()
687+
674688
@pytest.mark.anyio
675689
@pytest.mark.parametrize(
676690
"redirect_uri",

0 commit comments

Comments
 (0)