Debian Codegraph @

tests/functional/services/auth/service_client/test_delete_scope.py

raw
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_scope(
15 service_client,
16 uuid_type: type[str] | type[uuid.UUID],
17 ):
18 meta = load_response(service_client.delete_scope).metadata
19
20 if uuid_type is str:
21 res = service_client.delete_scope(meta["scope_id"])
22 else:
23 res = service_client.delete_scope(uuid.UUID(meta["scope_id"]))
24
25 assert res["scope"]["id"] == meta["scope_id"]