| 1 |
from __future__ import annotations |
| 2 |
|
| 3 |
import typing as t |
| 4 |
import uuid |
| 5 |
|
| 6 |
GROUP_ID = str(uuid.uuid1()) |
| 7 |
USER_ID = str(uuid.uuid1()) |
| 8 |
SUBSCRIPTION_ID = str(uuid.uuid1()) |
| 9 |
SUBSCRIPTION_GROUP_ID = str(uuid.uuid1()) |
| 10 |
SUBSCRIPTION_INFO = { |
| 11 |
"name": "Golems R Us", |
| 12 |
"subscriber_name": "University of Chicago Golem Lab", |
| 13 |
"is_high_assurance": True, |
| 14 |
"is_baa": False, |
| 15 |
"connectors": { |
| 16 |
"052be037-7dda-4d20-b163-3077314dc3e6": {"is_ha": True, "is_baa": False}, |
| 17 |
"1b6374b0-f6a4-4cf7-a26f-f262d9c6ca72": {"is_ha": True, "is_baa": False}, |
| 18 |
"28ef55da-1f97-11eb-bdfd-12704e0d6a4d": {"is_ha": True, "is_baa": False}, |
| 19 |
"49b00fd6-63f1-48ae-b27f-d8af4589f876": {"is_ha": True, "is_baa": False}, |
| 20 |
"56366b96-ac98-11e9-abac-9cb6d0d9fd63": {"is_ha": True, "is_baa": False}, |
| 21 |
"7251f6c8-93c9-11eb-95ba-12704e0d6a4d": {"is_ha": True, "is_baa": False}, |
| 22 |
"7643e831-5f6c-4b47-a07f-8ee90f401d23": {"is_ha": True, "is_baa": False}, |
| 23 |
"7c100eae-40fe-11e9-95a3-9cb6d0d9fd63": {"is_ha": True, "is_baa": False}, |
| 24 |
"7e3f3f5e-350c-4717-891a-2f451c24b0d4": {"is_ha": True, "is_baa": False}, |
| 25 |
"9436da0c-a444-11eb-af93-12704e0d6a4d": {"is_ha": True, "is_baa": False}, |
| 26 |
"976cf0cf-78c3-4aab-82d2-7c16adbcc281": {"is_ha": True, "is_baa": False}, |
| 27 |
"e47b6920-ff57-11ea-8aaa-000c297ab3c2": {"is_ha": True, "is_baa": False}, |
| 28 |
"fb656a17-0f69-4e59-95ff-d0a62ca7bdf5": {"is_ha": True, "is_baa": False}, |
| 29 |
}, |
| 30 |
} |
| 31 |
|
| 32 |
BASE_GROUP_DOC: dict[str, t.Any] = { |
| 33 |
"name": "Claptrap's Rough Riders", |
| 34 |
"description": "No stairs allowed.", |
| 35 |
"parent_id": None, |
| 36 |
"id": GROUP_ID, |
| 37 |
"group_type": "regular", |
| 38 |
"enforce_session": False, |
| 39 |
"session_limit": 28800, |
| 40 |
"session_timeouts": {}, |
| 41 |
"my_memberships": [ |
| 42 |
{ |
| 43 |
"group_id": GROUP_ID, |
| 44 |
"identity_id": USER_ID, |
| 45 |
"username": "[email protected]", |
| 46 |
"role": "member", |
| 47 |
"status": "active", |
| 48 |
} |
| 49 |
], |
| 50 |
"policies": { |
| 51 |
"group_visibility": "private", |
| 52 |
"group_members_visibility": "managers", |
| 53 |
}, |
| 54 |
"subscription_id": None, |
| 55 |
"subscription_info": None, |
| 56 |
} |
| 57 |
|
| 58 |
SUBSCRIPTION_GROUP_DOC: dict[str, t.Any] = { |
| 59 |
"name": "University of Chicago, Department of Magical Automata", |
| 60 |
"description": "The finest in machines that go 'ping!' and 'whomp!' and 'bzzt!'", |
| 61 |
"parent_id": None, |
| 62 |
"id": SUBSCRIPTION_GROUP_ID, |
| 63 |
"group_type": "plus", |
| 64 |
"enforce_session": True, |
| 65 |
"session_limit": 1800, |
| 66 |
"session_timeouts": {}, |
| 67 |
"my_memberships": [ |
| 68 |
{ |
| 69 |
"group_id": SUBSCRIPTION_GROUP_ID, |
| 70 |
"identity_id": USER_ID, |
| 71 |
"username": "[email protected]", |
| 72 |
"role": "member", |
| 73 |
"status": "active", |
| 74 |
} |
| 75 |
], |
| 76 |
"policies": { |
| 77 |
"group_visibility": "private", |
| 78 |
"group_members_visibility": "managers", |
| 79 |
}, |
| 80 |
"subscription_id": SUBSCRIPTION_ID, |
| 81 |
"subscription_info": SUBSCRIPTION_INFO, |
| 82 |
} |