MCPcopy Create free account
hub / github.com/CJackHwang/AIstudioProxyAPI / test_handle_client_exception

Function test_handle_client_exception

tests/api_utils/test_stream.py:63–71  ·  view source on GitHub ↗
(proxy_server)

Source from the content-addressed store, hash-verified

61
62@pytest.mark.asyncio
63async def test_handle_client_exception(proxy_server):
64 reader = AsyncMock()
65 writer = AsyncMock()
66 reader.readline.side_effect = Exception("Read error")
67
68 # Should log error but not raise (unless CancelledError)
69 await proxy_server.handle_client(reader, writer)
70
71 writer.close.assert_called()
72
73
74@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 1

handle_clientMethod · 0.80

Tested by

no test coverage detected