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

Function test_load_existing_json

tests/test_state.py:77–83  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

75
76
77def test_load_existing_json(tmp_path):
78 path = tmp_path / "hashes.json"
79 data = {"existinghash": {"file": "pre.pdf"}}
80 path.write_text(json.dumps(data))
81 registry = HashRegistry(path)
82 assert registry.is_known("existinghash") is True
83 assert registry.get("existinghash") == {"file": "pre.pdf"}
84
85
86def test_get_by_path_matches_path_raw_path_and_source_path(tmp_path):

Callers

nothing calls this directly

Calls 3

is_knownMethod · 0.95
getMethod · 0.95
HashRegistryClass · 0.90

Tested by

no test coverage detected