Closed coleslaw481 closed 5 years ago
Running this unit test fails cause the code in NiceCXNetwork.create_edge() does not check if value of edge_source and edge_target contain a dict which denotes its a node dict and '@id' should be examined:
NiceCXNetwork.create_edge()
def test_create_edge_with_node_dict_passed_in_for_edge_ids(self): net = NiceCXNetwork() nodeone = net.get_node(net.create_node('node1')) nodetwo = net.get_node(net.create_node('node2')) net.create_edge(edge_source=nodeone, edge_target=nodetwo) res = net.get_edge(0) self.assertEqual(0, res['@id']) self.assertEqual(0, res['s']) self.assertEqual(1, res['t'])
The res from above currently returns as:
res
{'@id': 0, 'n': 'node1', 'r': 'node1'}
Fixed in chrisdev3.1.0 branch
Running this unit test fails cause the code in
NiceCXNetwork.create_edge()
does not check if value of edge_source and edge_target contain a dict which denotes its a node dict and '@id' should be examined:The
res
from above currently returns as: