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 t, proc = _make_transport()
103
104 async def core() -> None:
105 req = await _read_request(proc)
106 assert req.kind == pb.Envelope.KIND_REQUEST
107 assert req.WhichOneof("payload") == "list_machines_req"
108 _feed(
109 proc,
110 pb.Envelope(
111 id=req.id,
112 kind=pb.Envelope.KIND_RESPONSE,
113 machine_list=m_pb.MachineList(
114 items=[m_pb.MachineSummary(id="m1", hostname="work")]
115 ),
116 ),
117 )
118
119 core_task = asyncio.create_task(core())
120 resp = await t.call_unary(pb.Envelope(list_machines_req=m_pb.ListMachinesRequest(presence="any")))

Calls 2

_read_requestFunction · 0.70
_feedFunction · 0.70

Tested by

no test coverage detected