def test_get_parents_by_id(self):
    g1 = NetworkGraph(self.s1.structure)
    g1.add_nodes(self.s1.structure.nodes_labels)
    g1.add_edges(self.s1.structure.edges)
    for node in g1.nodes:
        self.assertListEqual(g1.get_parents_by_id(node), list(g1._graph.predecessors(node)))
def test_get_parents_by_id(self):
    g1 = NetworkGraph(self.s1.structure)
    g1.add_nodes(self.s1.structure.nodes_labels)
    g1.add_edges(self.s1.structure.edges)
    for node in g1.nodes:
        self.assertListEqual(g1.get_parents_by_id(node), list(g1._graph.predecessors(node)))