Debian Codegraph @

tests/wire/test_organizations_groups_roles.py

raw symbols SCIP
1 from .conftest import get_client, verify_request_count
2
3
4 def test_organizations_groups_roles_list_() -> None:
5 """Test list endpoint with WireMock"""
6 test_id = "organizations.groups.roles.list_.0"
7 client = get_client(test_id)
8 client.organizations.groups.roles.list(
9 organization_id="organization_id",
10 group_id="group_id",
11 from_="from",
12 take=1,
13 )
14 verify_request_count(
15 test_id, "GET", "/organizations/organization_id/groups/group_id/roles", {"from": "from", "take": "1"}, 1
16 )
17
18
19 def test_organizations_groups_roles_create() -> None:
20 """Test create endpoint with WireMock"""
21 test_id = "organizations.groups.roles.create.0"
22 client = get_client(test_id)
23 client.organizations.groups.roles.create(
24 organization_id="organization_id",
25 group_id="group_id",
26 roles=["roles"],
27 )
28 verify_request_count(test_id, "POST", "/organizations/organization_id/groups/group_id/roles", None, 1)
29
30
31 def test_organizations_groups_roles_delete() -> None:
32 """Test delete endpoint with WireMock"""
33 test_id = "organizations.groups.roles.delete.0"
34 client = get_client(test_id)
35 client.organizations.groups.roles.delete(
36 organization_id="organization_id",
37 group_id="group_id",
38 roles=["roles"],
39 )
40 verify_request_count(test_id, "DELETE", "/organizations/organization_id/groups/group_id/roles", None, 1)