Client-side 2026-07-28 support: .discover()/.adopt() + Client(mode=); request-metadata green (#2950)

This commit is contained in:
Max 2026-06-25 16:09:23 +02:00 • committed by GitHub
commit f226d00d0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -74,4 +74,9 @@ async def test_call_add_tool(client: Client):
1. If you are using `trio`, you should set `"trio"` as the `anyio_backend`. Check more information in the [anyio documentation](https://anyio.readthedocs.io/en/stable/testing.html#specifying-the-backends-to-run-on).
2. The `client` fixture creates a connected client that can be reused across multiple tests.
!!! note
`Client(app)` connects in-process and is era-neutral by default — it probes the server and picks the
appropriate protocol path. Pin `mode='legacy'` if your test exercises legacy-specific semantics
(sampling/elicitation push, `message_handler`).
There you go! You can now extend your tests to cover more scenarios.