| 1 |
from __future__ import annotations |
| 2 |
|
| 3 |
import uuid |
| 4 |
|
| 5 |
import pytest |
| 6 |
|
| 7 |
from globus_sdk.testing import load_response |
| 8 |
|
| 9 |
|
| 10 |
@pytest.mark.parametrize( |
| 11 |
"uuid_type", |
| 12 |
(str, uuid.UUID), |
| 13 |
) |
| 14 |
def test_delete_policy( |
| 15 |
service_client, |
| 16 |
uuid_type: type[str] | type[uuid.UUID], |
| 17 |
): |
| 18 |
meta = load_response(service_client.delete_policy).metadata |
| 19 |
|
| 20 |
if uuid_type is str: |
| 21 |
res = service_client.delete_policy(meta["policy_id"]) |
| 22 |
else: |
| 23 |
res = service_client.delete_policy(uuid.UUID(meta["policy_id"])) |
| 24 |
|
| 25 |
assert res["policy"]["id"] == meta["policy_id"] |