MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / test_dict_format

Method test_dict_format

tests/test_compiler.py:84–96  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

82
83class TestParseConceptsPlan:
84 def test_dict_format(self):
85 text = json.dumps(
86 {
87 "create": [{"name": "foo", "title": "Foo"}],
88 "update": [{"name": "bar", "title": "Bar"}],
89 "related": ["baz"],
90 }
91 )
92 parsed = _parse_json(text)
93 assert isinstance(parsed, dict)
94 assert len(parsed["create"]) == 1
95 assert len(parsed["update"]) == 1
96 assert parsed["related"] == ["baz"]
97
98 def test_fallback_list_format(self):
99 text = json.dumps([{"name": "foo", "title": "Foo"}])

Callers

nothing calls this directly

Calls 1

_parse_jsonFunction · 0.90

Tested by

no test coverage detected