|
11 | 11 | from graphdatascience.arrow_client.v2.gds_arrow_client import GdsArrowClient |
12 | 12 | from graphdatascience.procedure_surface.api.catalog import GraphV2 |
13 | 13 | from graphdatascience.procedure_surface.arrow.catalog import CatalogArrowEndpoints |
| 14 | +from graphdatascience.procedure_surface.arrow.catalog.graph_backend_arrow import get_graph |
14 | 15 | from graphdatascience.query_runner.termination_flag import TerminationFlag |
15 | 16 | from graphdatascience.tests.integrationV2.conftest import GdsSessionConnectionInfo, create_arrow_client, start_session |
16 | 17 | from graphdatascience.tests.integrationV2.procedure_surface.arrow.graph_creation_helper import create_graph |
@@ -91,17 +92,19 @@ def test_project_from_triplets(arrow_client: AuthenticatedArrowClient, gds_arrow |
91 | 92 | {"sourceNode": np.array([1, 2, 3], dtype=np.int64), "targetNode": np.array([4, 5, 6], dtype=np.int64)} |
92 | 93 | ) |
93 | 94 |
|
94 | | - job_id = gds_arrow_client.create_graph_from_triplets("triplets") |
| 95 | + graph_name = "triplets" |
| 96 | + |
| 97 | + job_id = gds_arrow_client.create_graph_from_triplets(graph_name) |
95 | 98 | gds_arrow_client.upload_triplets(job_id, df) |
96 | 99 | gds_arrow_client.triplet_load_done(job_id) |
97 | 100 |
|
98 | 101 | while gds_arrow_client.job_status(job_id).status != "Done": |
99 | 102 | pass |
100 | 103 |
|
101 | | - listing = CatalogArrowEndpoints(arrow_client).list("triplets")[0] |
102 | | - assert listing.node_count == 6 |
103 | | - assert listing.relationship_count == 3 |
104 | | - assert listing.graph_name == "triplets" |
| 104 | + with get_graph(graph_name, arrow_client) as G: |
| 105 | + assert G.node_count() == 6 |
| 106 | + assert G.relationship_count() == 3 |
| 107 | + assert G.name() == graph_name |
105 | 108 |
|
106 | 109 |
|
107 | 110 | def test_project_from_triplets_interrupted( |
|
0 commit comments