| 1 | from .conftest import get_client, verify_request_count |
| 2 | |
| 3 | |
| 4 | def test_flows_executions_list_() -> None: |
| 5 | """Test list endpoint with WireMock""" |
| 6 | test_id = "flows.executions.list_.0" |
| 7 | client = get_client(test_id) |
| 8 | client.flows.executions.list( |
| 9 | flow_id="flow_id", |
| 10 | from_="from", |
| 11 | take=1, |
| 12 | ) |
| 13 | verify_request_count(test_id, "GET", "/flows/flow_id/executions", {"from": "from", "take": "1"}, 1) |
| 14 | |
| 15 | |
| 16 | def test_flows_executions_get() -> None: |
| 17 | """Test get endpoint with WireMock""" |
| 18 | test_id = "flows.executions.get.0" |
| 19 | client = get_client(test_id) |
| 20 | client.flows.executions.get( |
| 21 | flow_id="flow_id", |
| 22 | execution_id="execution_id", |
| 23 | hydrate=["debug"], |
| 24 | ) |
| 25 | verify_request_count(test_id, "GET", "/flows/flow_id/executions/execution_id", {"hydrate": "debug"}, 1) |
| 26 | |
| 27 | |
| 28 | def test_flows_executions_delete() -> None: |
| 29 | """Test delete endpoint with WireMock""" |
| 30 | test_id = "flows.executions.delete.0" |
| 31 | client = get_client(test_id) |
| 32 | client.flows.executions.delete( |
| 33 | flow_id="flow_id", |
| 34 | execution_id="execution_id", |
| 35 | ) |
| 36 | verify_request_count(test_id, "DELETE", "/flows/flow_id/executions/execution_id", None, 1) |