MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / client

Function client

methods/MIRIX/tests/test_memory_server.py:99–123  ·  view source on GitHub ↗

Get or create the demo client (represents client application).

(server, user)

Source from the content-addressed store, hash-verified

97
98@pytest_asyncio.fixture(scope="module", loop_scope="module")
99async def client(server, user):
100 """Get or create the demo client (represents client application)."""
101 client_id = "demo-client-app"
102
103 # Try to get existing client
104 try:
105 client = await server.client_manager.get_client_by_id(client_id)
106 if client:
107 return client
108 except Exception:
109 pass
110
111 # Create client
112 client = await server.client_manager.create_client(
113 pydantic_client=Client(
114 id=client_id,
115 name=client_id,
116 organization_id=user.organization_id,
117 status="active",
118 write_scope="test",
119 read_scopes=["test"],
120 )
121 )
122
123 return client
124
125
126@pytest_asyncio.fixture(scope="module", loop_scope="module")

Callers

nothing calls this directly

Calls 3

ClientClass · 0.90
get_client_by_idMethod · 0.45
create_clientMethod · 0.45

Tested by

no test coverage detected