| 1 |
from globus_sdk.testing.models import RegisteredResponse, ResponseSet |
| 2 |
|
| 3 |
from ._common import TWO_HOP_TRANSFER_FLOW_ID, TWO_HOP_TRANSFER_RUN |
| 4 |
|
| 5 |
_request_params = { |
| 6 |
"body": TWO_HOP_TRANSFER_RUN["details"]["details"]["input"], |
| 7 |
"tags": TWO_HOP_TRANSFER_RUN["tags"], |
| 8 |
"label": TWO_HOP_TRANSFER_RUN["label"], |
| 9 |
"run_monitors": TWO_HOP_TRANSFER_RUN["run_monitors"], |
| 10 |
"run_managers": TWO_HOP_TRANSFER_RUN["run_managers"], |
| 11 |
} |
| 12 |
RESPONSES = ResponseSet( |
| 13 |
metadata={"flow_id": TWO_HOP_TRANSFER_FLOW_ID, "request_params": _request_params}, |
| 14 |
default=RegisteredResponse( |
| 15 |
service="flows", |
| 16 |
method="POST", |
| 17 |
path=f"/flows/{TWO_HOP_TRANSFER_FLOW_ID}/run", |
| 18 |
json=TWO_HOP_TRANSFER_RUN, |
| 19 |
), |
| 20 |
missing_scope_error=RegisteredResponse( |
| 21 |
service="flows", |
| 22 |
method="POST", |
| 23 |
path=f"/flows/{TWO_HOP_TRANSFER_FLOW_ID}/run", |
| 24 |
status=403, |
| 25 |
json={ |
| 26 |
"error": { |
| 27 |
"code": "MISSING_SCOPE", |
| 28 |
"detail": ( |
| 29 |
"This action requires the following scope: frobulate[demuddle]" |
| 30 |
), |
| 31 |
} |
| 32 |
}, |
| 33 |
), |
| 34 |
) |