MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / snapshot_client

Function snapshot_client

tests/conftest.py:98–107  ·  view source on GitHub ↗
(
    is_recording: bool,
    http_snapshot_serializer_options: SnapshotSerializerOptions,
    http_snapshot: inline_snapshot.Snapshot[Any],
)

Source from the content-addressed store, hash-verified

96
97@pytest.fixture(scope="function")
98def snapshot_client(
99 is_recording: bool,
100 http_snapshot_serializer_options: SnapshotSerializerOptions,
101 http_snapshot: inline_snapshot.Snapshot[Any],
102) -> Iterator[Anthropic]:
103 with HttpxSyncSnapshotClient(
104 http_snapshot, is_recording, serializer_options=http_snapshot_serializer_options
105 ) as snapshot_client:
106 with Anthropic(http_client=snapshot_client, api_key=None if is_recording else api_key) as client:
107 yield client
108
109
110@pytest.fixture(scope="function")

Callers

nothing calls this directly

Calls 1

AnthropicClass · 0.90

Tested by

no test coverage detected