feat(graph): add parent field to GraphNode domain entity
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ac5b7bccc7
commit
4cf039e029
|
|
@ -8,6 +8,7 @@ class GraphNode:
|
||||||
label: str
|
label: str
|
||||||
status: str # FileStatus or "unknown"
|
status: str # FileStatus or "unknown"
|
||||||
group_id: str
|
group_id: str
|
||||||
|
parent: str | None = None
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
|
|
||||||
|
|
@ -80,3 +80,9 @@ def test_neighbors_unknown_node(graph_service, scan_result):
|
||||||
neighbors = graph_service.get_neighbors(view, "NONEXISTENT")
|
neighbors = graph_service.get_neighbors(view, "NONEXISTENT")
|
||||||
assert len(neighbors.nodes) == 0
|
assert len(neighbors.nodes) == 0
|
||||||
assert len(neighbors.edges) == 0
|
assert len(neighbors.edges) == 0
|
||||||
|
|
||||||
|
|
||||||
|
def test_graph_node_has_parent_field(graph_service, scan_result):
|
||||||
|
view = graph_service.build_panorama(scan_result)
|
||||||
|
for node in view.nodes:
|
||||||
|
assert hasattr(node, 'parent')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user