| 1 | from .conftest import get_client, verify_request_count |
| 2 | |
| 3 | from auth0.management import DeployActionVersionRequestContent |
| 4 | |
| 5 | |
| 6 | def test_actions_versions_list_() -> None: |
| 7 | """Test list endpoint with WireMock""" |
| 8 | test_id = "actions.versions.list_.0" |
| 9 | client = get_client(test_id) |
| 10 | client.actions.versions.list( |
| 11 | action_id="actionId", |
| 12 | page=1, |
| 13 | per_page=1, |
| 14 | ) |
| 15 | verify_request_count(test_id, "GET", "/actions/actions/actionId/versions", {"page": "1", "per_page": "1"}, 1) |
| 16 | |
| 17 | |
| 18 | def test_actions_versions_get() -> None: |
| 19 | """Test get endpoint with WireMock""" |
| 20 | test_id = "actions.versions.get.0" |
| 21 | client = get_client(test_id) |
| 22 | client.actions.versions.get( |
| 23 | action_id="actionId", |
| 24 | id="id", |
| 25 | ) |
| 26 | verify_request_count(test_id, "GET", "/actions/actions/actionId/versions/id", None, 1) |
| 27 | |
| 28 | |
| 29 | def test_actions_versions_deploy() -> None: |
| 30 | """Test deploy endpoint with WireMock""" |
| 31 | test_id = "actions.versions.deploy.0" |
| 32 | client = get_client(test_id) |
| 33 | client.actions.versions.deploy( |
| 34 | action_id="actionId", |
| 35 | id="id", |
| 36 | request=DeployActionVersionRequestContent(), |
| 37 | ) |
| 38 | verify_request_count(test_id, "POST", "/actions/actions/actionId/versions/id/deploy", None, 1) |