| 1 |
import uuid |
| 2 |
|
| 3 |
from globus_sdk.testing.models import RegisteredResponse, ResponseSet |
| 4 |
|
| 5 |
TUNNEL_ID = str(uuid.uuid4()) |
| 6 |
|
| 7 |
GET_TUNNEL_EVENTS_DOC = { |
| 8 |
"data": [ |
| 9 |
{ |
| 10 |
"type": "TunnelEvent", |
| 11 |
"id": 2768, |
| 12 |
"attributes": { |
| 13 |
"code": "STARTED", |
| 14 |
"is_error": False, |
| 15 |
"description": "started", |
| 16 |
"details": "Attempting tunnel establishment", |
| 17 |
"time": "2026-02-12T21:59:01.857473", |
| 18 |
}, |
| 19 |
}, |
| 20 |
{ |
| 21 |
"type": "TunnelEvent", |
| 22 |
"id": 2769, |
| 23 |
"attributes": { |
| 24 |
"code": "TUNNEL_ACTIVE", |
| 25 |
"is_error": False, |
| 26 |
"description": "tunnel is active", |
| 27 |
"details": "Tunnel has been established", |
| 28 |
"time": "2026-02-12T21:59:02.876253", |
| 29 |
}, |
| 30 |
}, |
| 31 |
{ |
| 32 |
"type": "TunnelEvent", |
| 33 |
"id": 2777, |
| 34 |
"attributes": { |
| 35 |
"code": "TUNNEL_STOPPED", |
| 36 |
"is_error": False, |
| 37 |
"description": "tunnel has been stopped", |
| 38 |
"details": "Tunnel stopped as requested.", |
| 39 |
"time": "2026-02-12T22:12:03.655877", |
| 40 |
}, |
| 41 |
}, |
| 42 |
], |
| 43 |
"links": None, |
| 44 |
"meta": {"request_id": "655TZe5vm"}, |
| 45 |
} |
| 46 |
|
| 47 |
|
| 48 |
RESPONSES = ResponseSet( |
| 49 |
metadata={ |
| 50 |
"tunnel_id": TUNNEL_ID, |
| 51 |
}, |
| 52 |
default=RegisteredResponse( |
| 53 |
service="transfer", |
| 54 |
path=f"/v2/tunnels/{TUNNEL_ID}/events", |
| 55 |
json=GET_TUNNEL_EVENTS_DOC, |
| 56 |
method="GET", |
| 57 |
), |
| 58 |
) |