Debian Codegraph @

src/globus_sdk/testing/data/globus_connect_server/update_endpoint.py

raw
1 import uuid
2
3 from globus_sdk.testing.models import RegisteredResponse, ResponseSet
4
5 endpoint_id = str(uuid.uuid4())
6 gcs_manager_url = RegisteredResponse._url_map["gcs"]
7 display_name = "Happy Fun Endpoint"
8
9 RESPONSES = ResponseSet(
10 metadata={
11 "endpoint_id": endpoint_id,
12 "display_name": display_name,
13 "gcs_manager_url": gcs_manager_url,
14 },
15 default=RegisteredResponse(
16 service="gcs",
17 method="PATCH",
18 path="/endpoint",
19 json={
20 "DATA_TYPE": "result#1.0.0",
21 "code": "success",
22 "data": [],
23 "detail": "success",
24 "has_next_page": False,
25 "http_response_code": 200,
26 "message": f"Updated endpoint {endpoint_id}",
27 },
28 ),
29 include_endpoint=RegisteredResponse(
30 service="gcs",
31 method="PATCH",
32 path="/endpoint",
33 json={
34 "DATA_TYPE": "result#1.0.0",
35 "code": "success",
36 "data": [
37 {
38 "DATA_TYPE": "endpoint#1.2.0",
39 "allow_udt": False,
40 "contact_email": "[email protected]",
41 "display_name": display_name,
42 "gcs_manager_url": gcs_manager_url,
43 "gridftp_control_channel_port": 443,
44 "id": endpoint_id,
45 "network_use": "normal",
46 "organization": "Globus",
47 "public": True,
48 "subscription_id": None,
49 }
50 ],
51 "detail": "success",
52 "has_next_page": False,
53 "http_response_code": 200,
54 "message": f"Updated endpoint {endpoint_id}",
55 },
56 ),
57 )