MCPcopy Create free account
hub / github.com/Ishabdullah/Codey-v2 / test_valid_json

Method test_valid_json

tests/test_json_parser.py:18–24  ·  view source on GitHub ↗

Valid JSON should parse correctly.

(self)

Source from the content-addressed store, hash-verified

16 """Test JSON extraction from LLM output."""
17
18 def test_valid_json(self):
19 """Valid JSON should parse correctly."""
20 raw = '{"name": "write_file", "args": {"path": "test.py", "content": "hello"}}'
21 result = extract_json(raw)
22 assert result is not None
23 assert result["name"] == "write_file"
24 assert result["args"]["path"] == "test.py"
25
26 def test_json_with_tool_tag(self):
27 """JSON inside tool tag should be extracted."""

Callers

nothing calls this directly

Calls 1

extract_jsonFunction · 0.90

Tested by

no test coverage detected