MCPcopy
hub / github.com/redis/redis-py / get_conn

Function get_conn

tests/test_asyncio/test_connection.py:295–301  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

293 mock_conn.port = 6379
294
295 async def get_conn():
296 # Validate only one client is created in single-client mode when
297 # concurrent requests are made
298 nonlocal init_call_count
299 await asyncio.sleep(0.01)
300 init_call_count += 1
301 return mock_conn
302
303 with mock.patch.object(r.connection_pool, "get_connection", get_conn):
304 with mock.patch.object(r.connection_pool, "release"):

Callers

nothing calls this directly

Calls 1

sleepMethod · 0.45

Tested by

no test coverage detected