| 1 | from .conftest import get_client, verify_request_count |
| 2 | |
| 3 | |
| 4 | def test_organizations_list_() -> None: |
| 5 | """Test list endpoint with WireMock""" |
| 6 | test_id = "organizations.list_.0" |
| 7 | client = get_client(test_id) |
| 8 | client.organizations.list( |
| 9 | from_="from", |
| 10 | take=1, |
| 11 | sort="sort", |
| 12 | ) |
| 13 | verify_request_count(test_id, "GET", "/organizations", {"from": "from", "take": "1", "sort": "sort"}, 1) |
| 14 | |
| 15 | |
| 16 | def test_organizations_create() -> None: |
| 17 | """Test create endpoint with WireMock""" |
| 18 | test_id = "organizations.create.0" |
| 19 | client = get_client(test_id) |
| 20 | client.organizations.create( |
| 21 | name="name", |
| 22 | ) |
| 23 | verify_request_count(test_id, "POST", "/organizations", None, 1) |
| 24 | |
| 25 | |
| 26 | def test_organizations_get_by_name() -> None: |
| 27 | """Test getByName endpoint with WireMock""" |
| 28 | test_id = "organizations.get_by_name.0" |
| 29 | client = get_client(test_id) |
| 30 | client.organizations.get_by_name( |
| 31 | name="name", |
| 32 | ) |
| 33 | verify_request_count(test_id, "GET", "/organizations/name/name", None, 1) |
| 34 | |
| 35 | |
| 36 | def test_organizations_get() -> None: |
| 37 | """Test get endpoint with WireMock""" |
| 38 | test_id = "organizations.get.0" |
| 39 | client = get_client(test_id) |
| 40 | client.organizations.get( |
| 41 | id="id", |
| 42 | ) |
| 43 | verify_request_count(test_id, "GET", "/organizations/id", None, 1) |
| 44 | |
| 45 | |
| 46 | def test_organizations_delete() -> None: |
| 47 | """Test delete endpoint with WireMock""" |
| 48 | test_id = "organizations.delete.0" |
| 49 | client = get_client(test_id) |
| 50 | client.organizations.delete( |
| 51 | id="id", |
| 52 | ) |
| 53 | verify_request_count(test_id, "DELETE", "/organizations/id", None, 1) |
| 54 | |
| 55 | |
| 56 | def test_organizations_update() -> None: |
| 57 | """Test update endpoint with WireMock""" |
| 58 | test_id = "organizations.update.0" |
| 59 | client = get_client(test_id) |
| 60 | client.organizations.update( |
| 61 | id="id", |
| 62 | ) |
| 63 | verify_request_count(test_id, "PATCH", "/organizations/id", None, 1) |