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