MCPcopy Create free account
hub / github.com/cocoindex-io/cocoindex-code / test_encode_decode_doctor_response

Function test_encode_decode_doctor_response

tests/test_protocol.py:152–163  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

150
151
152def test_encode_decode_doctor_response() -> None:
153 result = DoctorCheckResult(
154 name="Model Check", ok=True, details=["Embedding dimension: 384"], errors=[]
155 )
156 resp = DoctorResponse(result=result, final=False)
157 data = encode_response(resp)
158 decoded = decode_response(data)
159 assert isinstance(decoded, DoctorResponse)
160 assert decoded.result.name == "Model Check"
161 assert decoded.result.ok is True
162 assert decoded.result.details == ["Embedding dimension: 384"]
163 assert decoded.final is False
164
165
166def test_encode_decode_doctor_response_final() -> None:

Callers

nothing calls this directly

Calls 4

DoctorCheckResultClass · 0.90
DoctorResponseClass · 0.90
encode_responseFunction · 0.90
decode_responseFunction · 0.90

Tested by

no test coverage detected