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

Function async_snapshot_client

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

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

Callers

nothing calls this directly

Calls 1

AsyncAnthropicClass · 0.90

Tested by

no test coverage detected