MCPcopy Create free account
hub / github.com/IBM/mcp-cli / patched_loads

Method patched_loads

tests/apps/test_bridge.py:805–808  ·  view source on GitHub ↗
(s, **kw)

Source from the content-addressed store, hash-verified

803 original_loads = json.loads
804
805 def patched_loads(s, **kw):
806 if isinstance(s, str) and s == '{"fake": true}':
807 return [1, 2, 3] # return list, not dict → hits line 401
808 return original_loads(s, **kw)
809
810 out = {"content": [{"type": "text", "text": '{"fake": true}'}]}
811 with mock.patch("mcp_cli.apps.bridge.json.loads", side_effect=patched_loads):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected