Debian Codegraph @

src/globus_sdk/testing/data/flows/cancel_run.py

raw
1 import copy
2
3 from globus_sdk.testing import RegisteredResponse, ResponseSet
4
5 from ._common import TWO_HOP_TRANSFER_RUN
6
7 RUN_ID = TWO_HOP_TRANSFER_RUN["run_id"]
8 SUCCESS_RESPONSE = copy.deepcopy(TWO_HOP_TRANSFER_RUN)
9 SUCCESS_RESPONSE.update(
10 {
11 "status": "FAILED",
12 "display_status": "FAILED",
13 "details": {
14 "time": "2023-06-12T23:04:42.121000+00:00",
15 "code": "FlowCanceled",
16 "description": "The Flow Instance was canceled by the user",
17 "details": {},
18 },
19 }
20 )
21
22 RESPONSES = ResponseSet(
23 metadata={"run_id": RUN_ID},
24 default=RegisteredResponse(
25 service="flows",
26 method="POST",
27 path=f"/runs/{RUN_ID}/cancel",
28 json=SUCCESS_RESPONSE,
29 ),
30 )