| 1 | from .conftest import get_client, verify_request_count |
| 2 | |
| 3 | |
| 4 | def test_resourceServers_list_() -> None: |
| 5 | """Test list endpoint with WireMock""" |
| 6 | test_id = "resource_servers.list_.0" |
| 7 | client = get_client(test_id) |
| 8 | client.resource_servers.list( |
| 9 | identifiers=["identifiers"], |
| 10 | page=1, |
| 11 | per_page=1, |
| 12 | include_totals=True, |
| 13 | include_fields=True, |
| 14 | ) |
| 15 | verify_request_count( |
| 16 | test_id, |
| 17 | "GET", |
| 18 | "/resource-servers", |
| 19 | { |
| 20 | "identifiers": "identifiers", |
| 21 | "page": "1", |
| 22 | "per_page": "1", |
| 23 | "include_totals": "true", |
| 24 | "include_fields": "true", |
| 25 | }, |
| 26 | 1, |
| 27 | ) |
| 28 | |
| 29 | |
| 30 | def test_resourceServers_create() -> None: |
| 31 | """Test create endpoint with WireMock""" |
| 32 | test_id = "resource_servers.create.0" |
| 33 | client = get_client(test_id) |
| 34 | client.resource_servers.create( |
| 35 | identifier="identifier", |
| 36 | ) |
| 37 | verify_request_count(test_id, "POST", "/resource-servers", None, 1) |
| 38 | |
| 39 | |
| 40 | def test_resourceServers_get() -> None: |
| 41 | """Test get endpoint with WireMock""" |
| 42 | test_id = "resource_servers.get.0" |
| 43 | client = get_client(test_id) |
| 44 | client.resource_servers.get( |
| 45 | id="id", |
| 46 | include_fields=True, |
| 47 | ) |
| 48 | verify_request_count(test_id, "GET", "/resource-servers/id", {"include_fields": "true"}, 1) |
| 49 | |
| 50 | |
| 51 | def test_resourceServers_delete() -> None: |
| 52 | """Test delete endpoint with WireMock""" |
| 53 | test_id = "resource_servers.delete.0" |
| 54 | client = get_client(test_id) |
| 55 | client.resource_servers.delete( |
| 56 | id="id", |
| 57 | ) |
| 58 | verify_request_count(test_id, "DELETE", "/resource-servers/id", None, 1) |
| 59 | |
| 60 | |
| 61 | def test_resourceServers_update() -> None: |
| 62 | """Test update endpoint with WireMock""" |
| 63 | test_id = "resource_servers.update.0" |
| 64 | client = get_client(test_id) |
| 65 | client.resource_servers.update( |
| 66 | id="id", |
| 67 | ) |
| 68 | verify_request_count(test_id, "PATCH", "/resource-servers/id", None, 1) |