Debian Codegraph @

tests/wire/test_clientGrants.py

raw symbols SCIP
1 from .conftest import get_client, verify_request_count
2
3
4 def test_clientGrants_list_() -> None:
5 """Test list endpoint with WireMock"""
6 test_id = "client_grants.list_.0"
7 client = get_client(test_id)
8 client.client_grants.list(
9 from_="from",
10 take=1,
11 audience="audience",
12 client_id="client_id",
13 allow_any_organization=True,
14 subject_type="client",
15 default_for="third_party_clients",
16 )
17 verify_request_count(
18 test_id,
19 "GET",
20 "/client-grants",
21 {
22 "from": "from",
23 "take": "1",
24 "audience": "audience",
25 "client_id": "client_id",
26 "allow_any_organization": "true",
27 "subject_type": "client",
28 "default_for": "third_party_clients",
29 },
30 1,
31 )
32
33
34 def test_clientGrants_create() -> None:
35 """Test create endpoint with WireMock"""
36 test_id = "client_grants.create.0"
37 client = get_client(test_id)
38 client.client_grants.create(
39 audience="audience",
40 )
41 verify_request_count(test_id, "POST", "/client-grants", None, 1)
42
43
44 def test_clientGrants_get() -> None:
45 """Test get endpoint with WireMock"""
46 test_id = "client_grants.get.0"
47 client = get_client(test_id)
48 client.client_grants.get(
49 id="id",
50 )
51 verify_request_count(test_id, "GET", "/client-grants/id", None, 1)
52
53
54 def test_clientGrants_delete() -> None:
55 """Test delete endpoint with WireMock"""
56 test_id = "client_grants.delete.0"
57 client = get_client(test_id)
58 client.client_grants.delete(
59 id="id",
60 )
61 verify_request_count(test_id, "DELETE", "/client-grants/id", None, 1)
62
63
64 def test_clientGrants_update() -> None:
65 """Test update endpoint with WireMock"""
66 test_id = "client_grants.update.0"
67 client = get_client(test_id)
68 client.client_grants.update(
69 id="id",
70 )
71 verify_request_count(test_id, "PATCH", "/client-grants/id", None, 1)