Debian Codegraph @

src/globus_sdk/testing/data/timer/create_timer.py

raw
1 from globus_sdk.testing.models import RegisteredResponse, ResponseSet
2
3 from ._common import (
4 DEST_EP_ID,
5 FLOW_ID,
6 SOURCE_EP_ID,
7 TIMER_ID,
8 V2_FLOW_TIMER,
9 V2_TRANSFER_TIMER,
10 )
11
12 RESPONSES = ResponseSet(
13 default=RegisteredResponse(
14 service="timer",
15 path="/v2/timer",
16 method="POST",
17 json={
18 "timer": V2_TRANSFER_TIMER,
19 },
20 status=201,
21 metadata={
22 "timer_id": TIMER_ID,
23 "source_endpoint": SOURCE_EP_ID,
24 "destination_endpoint": DEST_EP_ID,
25 },
26 ),
27 flow_timer_success=RegisteredResponse(
28 service="timer",
29 path="/v2/timer",
30 method="POST",
31 json={
32 "timer": V2_FLOW_TIMER,
33 },
34 status=201,
35 metadata={
36 "timer_id": V2_FLOW_TIMER["job_id"],
37 "flow_id": FLOW_ID,
38 "callback_body": V2_FLOW_TIMER["callback_body"],
39 "schedule": V2_FLOW_TIMER["schedule"],
40 },
41 ),
42 )