Skip to content

Commit 4b08a9b

Browse files
committed
Fix code style
1 parent 5bb8aa9 commit 4b08a9b

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

graphdatascience/tests/unit/test_gds_arrow_client.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,24 @@ def test_auth_middleware_bad_headers() -> None:
3131
with pytest.raises(ValueError, match="Incompatible header value received from server: `12342`"):
3232
middleware.received_headers({"authorization": [12342]})
3333

34+
3435
def test_handle_flight_error():
3536
with pytest.raises(
36-
flight.FlightServerError, match="FlightServerError: UNKNOWN: Graph with name `people-and-fruits` does not exist on database `neo4j`. It might exist on another database."
37+
flight.FlightServerError,
38+
match="FlightServerError: UNKNOWN: Graph with name `people-and-fruits` does not exist on database `neo4j`. It might exist on another database.",
3739
):
38-
GdsArrowClient.handle_flight_error(flight.FlightServerError(
39-
"FlightServerError: Flight RPC failed with message: org.apache.arrow.flight.FlightRuntimeException: UNKNOWN: Graph with name `people-and-fruits` does not exist on database `neo4j`. It might exist on another database.. gRPC client debug context: UNKNOWN:Error received from peer ipv4:35.241.177.75:8491 {created_time:\"2024-08-29T15:59:03.828903999+02:00\", grpc_status:2, grpc_message:\"org.apache.arrow.flight.FlightRuntimeException: UNKNOWN: Graph with name `people-and-fruits` does not exist on database `neo4j`. It might exist on another database.\"}. Client context: IOError: Server never sent a data message. Detail: Internal"))
40+
GdsArrowClient.handle_flight_error(
41+
flight.FlightServerError(
42+
'FlightServerError: Flight RPC failed with message: org.apache.arrow.flight.FlightRuntimeException: UNKNOWN: Graph with name `people-and-fruits` does not exist on database `neo4j`. It might exist on another database.. gRPC client debug context: UNKNOWN:Error received from peer ipv4:35.241.177.75:8491 {created_time:"2024-08-29T15:59:03.828903999+02:00", grpc_status:2, grpc_message:"org.apache.arrow.flight.FlightRuntimeException: UNKNOWN: Graph with name `people-and-fruits` does not exist on database `neo4j`. It might exist on another database."}. Client context: IOError: Server never sent a data message. Detail: Internal'
43+
)
44+
)
4045

4146
with pytest.raises(
42-
flight.FlightServerError, match=re.escape("FlightServerError: UNKNOWN: Unexpected configuration key(s): [undirectedRelationshipTypes]")
47+
flight.FlightServerError,
48+
match=re.escape("FlightServerError: UNKNOWN: Unexpected configuration key(s): [undirectedRelationshipTypes]"),
4349
):
44-
GdsArrowClient.handle_flight_error(flight.FlightServerError(
45-
"FlightServerError: Flight returned internal error, with message: org.apache.arrow.flight.FlightRuntimeException: UNKNOWN: Unexpected configuration key(s): [undirectedRelationshipTypes]"))
50+
GdsArrowClient.handle_flight_error(
51+
flight.FlightServerError(
52+
"FlightServerError: Flight returned internal error, with message: org.apache.arrow.flight.FlightRuntimeException: UNKNOWN: Unexpected configuration key(s): [undirectedRelationshipTypes]"
53+
)
54+
)

0 commit comments

Comments
 (0)