| 1 | from .conftest import get_client, verify_request_count |
| 2 | |
| 3 | |
| 4 | def test_organizations_clientGrants_list_() -> None: |
| 5 | """Test list endpoint with WireMock""" |
| 6 | test_id = "organizations.client_grants.list_.0" |
| 7 | client = get_client(test_id) |
| 8 | client.organizations.client_grants.list( |
| 9 | id="id", |
| 10 | audience="audience", |
| 11 | client_id="client_id", |
| 12 | grant_ids=["grant_ids"], |
| 13 | page=1, |
| 14 | per_page=1, |
| 15 | include_totals=True, |
| 16 | ) |
| 17 | verify_request_count( |
| 18 | test_id, |
| 19 | "GET", |
| 20 | "/organizations/id/client-grants", |
| 21 | { |
| 22 | "audience": "audience", |
| 23 | "client_id": "client_id", |
| 24 | "grant_ids": "grant_ids", |
| 25 | "page": "1", |
| 26 | "per_page": "1", |
| 27 | "include_totals": "true", |
| 28 | }, |
| 29 | 1, |
| 30 | ) |
| 31 | |
| 32 | |
| 33 | def test_organizations_clientGrants_create() -> None: |
| 34 | """Test create endpoint with WireMock""" |
| 35 | test_id = "organizations.client_grants.create.0" |
| 36 | client = get_client(test_id) |
| 37 | client.organizations.client_grants.create( |
| 38 | id="id", |
| 39 | grant_id="grant_id", |
| 40 | ) |
| 41 | verify_request_count(test_id, "POST", "/organizations/id/client-grants", None, 1) |
| 42 | |
| 43 | |
| 44 | def test_organizations_clientGrants_delete() -> None: |
| 45 | """Test delete endpoint with WireMock""" |
| 46 | test_id = "organizations.client_grants.delete.0" |
| 47 | client = get_client(test_id) |
| 48 | client.organizations.client_grants.delete( |
| 49 | id="id", |
| 50 | grant_id="grant_id", |
| 51 | ) |
| 52 | verify_request_count(test_id, "DELETE", "/organizations/id/client-grants/grant_id", None, 1) |