plexus.cli.procedure.test_service_task_creation module
Tests for ProcedureService task creation logic.
Verifies that tasks created for procedures have the correct command format and dispatch status based on dispatch mode.
- class plexus.cli.procedure.test_service_task_creation.TestProcedureTaskCreation
Bases:
objectTest task creation with correct command format and dispatch status.
- mock_client()
Create a mock dashboard client that returns appropriate responses.
- service(mock_client)
Create a ProcedureService with mocked client.
- test_celery_mode_creates_pending_task_with_run_command(service, mock_client)
Test that celery dispatch mode creates task with ‘procedure run’ command and PENDING status.
- test_command_format_matches_cli_structure(service, mock_client)
Test that the command format matches the actual CLI command structure.
The CLI command is: plexus procedure run <procedure-id> So the Task command should be: procedure run <procedure-id>
- test_local_mode_creates_local_task_with_run_command(service, mock_client)
Test that local dispatch mode creates task with ‘procedure run’ command and LOCAL status.