MCPcopy
hub / github.com/volcengine/OpenViking / client_with_resource_sync

Function client_with_resource_sync

bot/tests/conftest.py:177–186  ·  view source on GitHub ↗

Create client with resource (sync mode, wait for vectorization)

(
    client: AsyncOpenViking, sample_markdown_file: Path
)

Source from the content-addressed store, hash-verified

175
176@pytest_asyncio.fixture(scope="function")
177async def client_with_resource_sync(
178 client: AsyncOpenViking, sample_markdown_file: Path
179) -> AsyncGenerator[tuple[AsyncOpenViking, str], None]:
180 """Create client with resource (sync mode, wait for vectorization)"""
181 result = await client.add_resource(
182 path=str(sample_markdown_file), reason="Test resource", wait=True
183 )
184 uri = result.get("root_uri", "")
185
186 yield client, uri
187
188
189@pytest_asyncio.fixture(scope="function")

Callers

nothing calls this directly

Calls 3

strFunction · 0.50
add_resourceMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected