@@ -33,7 +33,7 @@ def test_from_neo4j_graph(neo4j_session: Session) -> None:
3333 assert sorted (VG .nodes , key = lambda x : x .name ) == expected_nodes # type: ignore[attr-defined]
3434
3535 assert len (VG .relationships ) == 2
36- vg_rels = sorted ([(e .source , e .target , e .caption ) for e in VG .relationships ], key = lambda x : x [2 ])
36+ vg_rels = sorted ([(e .source , e .target , e .caption ) for e in VG .relationships ], key = lambda x : x [2 ] if x [ 2 ] else "foo" )
3737 assert vg_rels == [
3838 (node_ids [0 ], node_ids [1 ], "KNOWS" ),
3939 (node_ids [1 ], node_ids [0 ], "RELATED" ),
@@ -58,7 +58,7 @@ def test_from_neo4j_result(neo4j_session: Session) -> None:
5858 assert sorted (VG .nodes , key = lambda x : x .name ) == expected_nodes # type: ignore[attr-defined]
5959
6060 assert len (VG .relationships ) == 2
61- vg_rels = sorted ([(e .source , e .target , e .caption ) for e in VG .relationships ], key = lambda x : x [2 ])
61+ vg_rels = sorted ([(e .source , e .target , e .caption ) for e in VG .relationships ], key = lambda x : x [2 ] if x [ 2 ] else "foo" )
6262 assert vg_rels == [
6363 (node_ids [0 ], node_ids [1 ], "KNOWS" ),
6464 (node_ids [1 ], node_ids [0 ], "RELATED" ),
@@ -82,7 +82,7 @@ def test_from_neo4j_graph_full(neo4j_session: Session) -> None:
8282 assert sorted (VG .nodes , key = lambda x : x .name ) == expected_nodes # type: ignore[attr-defined]
8383
8484 assert len (VG .relationships ) == 2
85- vg_rels = sorted ([(e .source , e .target , e .caption ) for e in VG .relationships ], key = lambda x : x [2 ])
85+ vg_rels = sorted ([(e .source , e .target , e .caption ) for e in VG .relationships ], key = lambda x : x [2 ] if x [ 2 ] else "foo" )
8686 assert vg_rels == [
8787 (node_ids [1 ], node_ids [0 ], "2015" ),
8888 (node_ids [0 ], node_ids [1 ], "2025" ),
0 commit comments