MCPcopy Index your code
hub / github.com/tirth8205/code-review-graph / test_export_graph_data

Function test_export_graph_data

tests/test_visualization.py:112–128  ·  view source on GitHub ↗
(store_with_data)

Source from the content-addressed store, hash-verified

110
111
112def test_export_graph_data(store_with_data):
113 from code_review_graph.visualization import export_graph_data
114
115 data = export_graph_data(store_with_data)
116 assert "nodes" in data
117 assert "edges" in data
118 assert "stats" in data
119 assert len(data["nodes"]) == 5
120 assert len(data["edges"]) == 2
121 node_names = {n["name"] for n in data["nodes"]}
122 assert "auth.py" in node_names
123 assert "AuthService" in node_names
124 assert "login" in node_names
125 edge_kinds = {e["kind"] for e in data["edges"]}
126 assert "CONTAINS" in edge_kinds
127 assert "CALLS" in edge_kinds
128 json.dumps(data) # must be serializable
129
130
131def test_generate_html(store_with_data, tmp_path):

Callers

nothing calls this directly

Calls 1

export_graph_dataFunction · 0.90

Tested by

no test coverage detected