| 1 |
from globus_sdk.testing.models import RegisteredResponse, ResponseSet |
| 2 |
|
| 3 |
INDEX_ID = "60d1160b-f016-40b0-8545-99619865873d" |
| 4 |
IDENTITY_IDS = [ |
| 5 |
"ae332d86-d274-11e5-b885-b31714a110e9", |
| 6 |
"c699d42e-d274-11e5-bf75-1fc5bf53bb24", |
| 7 |
] |
| 8 |
ROLE_IDS = ["MDMwMjM5", "MDQ0ODYz"] |
| 9 |
|
| 10 |
|
| 11 |
RESPONSES = ResponseSet( |
| 12 |
metadata={"index_id": INDEX_ID, "identity_ids": IDENTITY_IDS, "role_ids": ROLE_IDS}, |
| 13 |
default=RegisteredResponse( |
| 14 |
service="search", |
| 15 |
path=f"/v1/index/{INDEX_ID}/role_list", |
| 16 |
json={ |
| 17 |
"role_list": [ |
| 18 |
{ |
| 19 |
"creation_date": "2021-11-09 20:26:45", |
| 20 |
"id": ROLE_IDS[0], |
| 21 |
"index_id": INDEX_ID, |
| 22 |
"principal": "urn:globus:auth:identity:" + IDENTITY_IDS[0], |
| 23 |
"principal_type": "identity", |
| 24 |
"role_name": "owner", |
| 25 |
}, |
| 26 |
{ |
| 27 |
"creation_date": "2022-01-24 15:33:41", |
| 28 |
"id": ROLE_IDS[1], |
| 29 |
"index_id": INDEX_ID, |
| 30 |
"principal": "urn:globus:auth:identity:" + IDENTITY_IDS[1], |
| 31 |
"principal_type": "identity", |
| 32 |
"role_name": "writer", |
| 33 |
}, |
| 34 |
] |
| 35 |
}, |
| 36 |
), |
| 37 |
) |