| 1 | from .conftest import get_client, verify_request_count |
| 2 | |
| 3 | |
| 4 | def test_hooks_secrets_get() -> None: |
| 5 | """Test get endpoint with WireMock""" |
| 6 | test_id = "hooks.secrets.get.0" |
| 7 | client = get_client(test_id) |
| 8 | client.hooks.secrets.get( |
| 9 | id="id", |
| 10 | ) |
| 11 | verify_request_count(test_id, "GET", "/hooks/id/secrets", None, 1) |
| 12 | |
| 13 | |
| 14 | def test_hooks_secrets_create() -> None: |
| 15 | """Test create endpoint with WireMock""" |
| 16 | test_id = "hooks.secrets.create.0" |
| 17 | client = get_client(test_id) |
| 18 | client.hooks.secrets.create( |
| 19 | id="id", |
| 20 | request={"key": "value"}, |
| 21 | ) |
| 22 | verify_request_count(test_id, "POST", "/hooks/id/secrets", None, 1) |
| 23 | |
| 24 | |
| 25 | def test_hooks_secrets_delete() -> None: |
| 26 | """Test delete endpoint with WireMock""" |
| 27 | test_id = "hooks.secrets.delete.0" |
| 28 | client = get_client(test_id) |
| 29 | client.hooks.secrets.delete( |
| 30 | id="id", |
| 31 | request=["string"], |
| 32 | ) |
| 33 | verify_request_count(test_id, "DELETE", "/hooks/id/secrets", None, 1) |
| 34 | |
| 35 | |
| 36 | def test_hooks_secrets_update() -> None: |
| 37 | """Test update endpoint with WireMock""" |
| 38 | test_id = "hooks.secrets.update.0" |
| 39 | client = get_client(test_id) |
| 40 | client.hooks.secrets.update( |
| 41 | id="id", |
| 42 | request={"key": "value"}, |
| 43 | ) |
| 44 | verify_request_count(test_id, "PATCH", "/hooks/id/secrets", None, 1) |