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