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

Function async_snapshot_client

tests/conftest.py:111–120  ·  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

109
110@pytest.fixture(scope="function")
111async def async_snapshot_client(
112 is_recording: bool,
113 http_snapshot_serializer_options: SnapshotSerializerOptions,
114 http_snapshot: inline_snapshot.Snapshot[Any],
115) -> AsyncIterator[AsyncAnthropic]:
116 async with HttpxAsyncSnapshotClient(
117 http_snapshot, is_recording, serializer_options=http_snapshot_serializer_options
118 ) as snapshot_client:
119 client = AsyncAnthropic(http_client=snapshot_client, api_key=None if is_recording else api_key)
120 yield client
121
122
123@pytest.fixture(scope="session")

Callers

nothing calls this directly

Calls 1

AsyncAnthropicClass · 0.90

Tested by

no test coverage detected