1b74b06753
Cut comment and docstring volume roughly in half across src, tests, examples, and docs_src: removed comments that restate the adjacent code, leftover development narration, section banners, and self-evident Args/Returns blocks, and compressed the remaining docstrings to a Google-style summary line plus only the detail that earns its place. Kept (and tightened) the load-bearing content: Raises sections, deprecation and version-availability notes, spec/RFC/issue references, why-comments for non-obvious decisions, and all coverage pragmas. The generated mcp_types.v* wire modules are untouched.
21 lines
501 B
Python
21 lines
501 B
Python
import httpx
|
|
|
|
from mcp.shared._httpx_utils import create_mcp_http_client
|
|
|
|
|
|
def test_default_settings():
|
|
client = create_mcp_http_client()
|
|
|
|
assert client.follow_redirects is True
|
|
assert client.timeout.connect == 30.0
|
|
|
|
|
|
def test_custom_parameters():
|
|
headers = {"Authorization": "Bearer token"}
|
|
timeout = httpx.Timeout(60.0)
|
|
|
|
client = create_mcp_http_client(headers, timeout)
|
|
|
|
assert client.headers["Authorization"] == "Bearer token"
|
|
assert client.timeout.connect == 60.0
|