diff --git a/tests/test_update.py b/tests/test_update.py index 36feb7d..53a026e 100644 --- a/tests/test_update.py +++ b/tests/test_update.py @@ -449,6 +449,7 @@ def test_merge_identical_attributes(): assert ATTRIBUTE_A in node.attributes assert len(node.attributes) == 1 + def test_merge_knowledge_graph_edges(): """ Test that knowledge graph edges are merged properly @@ -470,13 +471,13 @@ def test_merge_knowledge_graph_edges(): { "resource_id": "kp0", "resource_role": "aggregator_knowledge_source", - "upstream_resource_ids": ["ks0"] + "upstream_resource_ids": ["ks0"], }, { "resource_id": "ara0", "resource_role": "aggregator_knowledge_source", - "upstream_resource_ids": ["kp0"] - } + "upstream_resource_ids": ["kp0"], + }, ], "attributes": [], } @@ -501,13 +502,13 @@ def test_merge_knowledge_graph_edges(): { "resource_id": "kp1", "resource_role": "aggregator_knowledge_source", - "upstream_resource_ids": ["ks0"] + "upstream_resource_ids": ["ks0"], }, { "resource_id": "ara0", "resource_role": "aggregator_knowledge_source", - "upstream_resource_ids": ["kp1"] - } + "upstream_resource_ids": ["kp1"], + }, ], "attributes": [], } @@ -524,9 +525,9 @@ def test_merge_knowledge_graph_edges(): edges = m.knowledge_graph.edges assert len(edges) == 1 edge = next(iter(edges.values())) - + sources = edge.sources assert len(sources) == 4 for source in sources: if source.resource_id == "ara0": - assert len(source.upstream_resource_ids) == 2 \ No newline at end of file + assert len(source.upstream_resource_ids) == 2