Debian Codegraph @

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

raw
1 from globus_sdk.testing.models import RegisteredResponse, ResponseSet
2
3 from ._common import TWO_HOP_TRANSFER_FLOW_DOC
4
5 _two_hop_transfer_create_request = {
6 k: TWO_HOP_TRANSFER_FLOW_DOC[k]
7 for k in [
8 "title",
9 "definition",
10 "input_schema",
11 "subtitle",
12 "description",
13 "flow_viewers",
14 "flow_starters",
15 "flow_administrators",
16 "run_managers",
17 "run_monitors",
18 "keywords",
19 ]
20 }
21 RESPONSES = ResponseSet(
22 metadata={
23 "params": _two_hop_transfer_create_request,
24 },
25 default=RegisteredResponse(
26 service="flows",
27 path="/flows",
28 method="POST",
29 json=TWO_HOP_TRANSFER_FLOW_DOC,
30 ),
31 bad_admin_principal_error=RegisteredResponse(
32 service="flows",
33 path="/flows",
34 method="POST",
35 status=422,
36 json={
37 "error": {
38 "code": "UNPROCESSABLE_ENTITY",
39 "detail": [
40 {
41 "loc": ["flow_administrators", 0],
42 "msg": (
43 "Unrecognized principal string: "
44 '"ae341a98-d274-11e5-b888-dbae3a8ba545". '
45 'Allowed principal types in role "FlowAdministrator": '
46 "[<AuthGroupUrn>, <AuthIdentityUrn>]"
47 ),
48 "type": "value_error",
49 },
50 {
51 "loc": ["flow_administrators", 1],
52 "msg": (
53 "Unrecognized principal string: "
54 '"4fab4345-6d20-43a0-9a25-16b2e3bbe765". '
55 'Allowed principal types in role "FlowAdministrator": '
56 "[<AuthGroupUrn>, <AuthIdentityUrn>]"
57 ),
58 "type": "value_error",
59 },
60 ],
61 },
62 "debug_id": "cf71b1d1-ab7e-48b1-8c54-764201d28ded",
63 },
64 ),
65 )