| 1 | from .conftest import get_client, verify_request_count |
| 2 | |
| 3 | |
| 4 | def test_deviceCredentials_list_() -> None: |
| 5 | """Test list endpoint with WireMock""" |
| 6 | test_id = "device_credentials.list_.0" |
| 7 | client = get_client(test_id) |
| 8 | client.device_credentials.list( |
| 9 | page=1, |
| 10 | per_page=1, |
| 11 | include_totals=True, |
| 12 | fields="fields", |
| 13 | include_fields=True, |
| 14 | user_id="user_id", |
| 15 | client_id="client_id", |
| 16 | type="public_key", |
| 17 | ) |
| 18 | verify_request_count( |
| 19 | test_id, |
| 20 | "GET", |
| 21 | "/device-credentials", |
| 22 | { |
| 23 | "page": "1", |
| 24 | "per_page": "1", |
| 25 | "include_totals": "true", |
| 26 | "fields": "fields", |
| 27 | "include_fields": "true", |
| 28 | "user_id": "user_id", |
| 29 | "client_id": "client_id", |
| 30 | "type": "public_key", |
| 31 | }, |
| 32 | 1, |
| 33 | ) |
| 34 | |
| 35 | |
| 36 | def test_deviceCredentials_create_public_key() -> None: |
| 37 | """Test createPublicKey endpoint with WireMock""" |
| 38 | test_id = "device_credentials.create_public_key.0" |
| 39 | client = get_client(test_id) |
| 40 | client.device_credentials.create_public_key( |
| 41 | device_name="device_name", |
| 42 | type="public_key", |
| 43 | value="value", |
| 44 | device_id="device_id", |
| 45 | ) |
| 46 | verify_request_count(test_id, "POST", "/device-credentials", None, 1) |
| 47 | |
| 48 | |
| 49 | def test_deviceCredentials_delete() -> None: |
| 50 | """Test delete endpoint with WireMock""" |
| 51 | test_id = "device_credentials.delete.0" |
| 52 | client = get_client(test_id) |
| 53 | client.device_credentials.delete( |
| 54 | id="id", |
| 55 | ) |
| 56 | verify_request_count(test_id, "DELETE", "/device-credentials/id", None, 1) |