MCPcopy Create free account
hub / github.com/commandoperator/cmdop-sdk / core

Function core

python/tests/test_transport.py:104–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102@pytest.mark.asyncio
103async def test_stream_collects_events_and_rejects_failed_done() -> None:
104 transport, process = _transport()
105 stream = transport.call_stream(
106 pb.Envelope(
107 ask_machine_req=pb.AskMachineRequest(machine_id="m1", prompt="hello")
108 )
109 )
110 collected = asyncio.create_task(stream.collect())
111 request = await _request(process)
112 _feed(
113 process,
114 pb.Envelope(
115 id=request.id,
116 kind=pb.Envelope.KIND_EVENT,
117 ask_event=pb.AskEvent(event_type=pb.AGENT_EVENT_TYPE_TOKEN, payload_json='{"delta":"hi"}'),
118 ),
119 )
120 _feed(

Calls 2

_read_requestFunction · 0.70
_feedFunction · 0.70

Tested by

no test coverage detected