(self)
| 968 | """Test the prompt step type.""" |
| 969 | |
| 970 | def test_execute_basic(self): |
| 971 | from unittest.mock import patch |
| 972 | from specify_cli.workflows.steps.prompt import PromptStep |
| 973 | from specify_cli.workflows.base import StepContext, StepStatus |
| 974 | |
| 975 | step = PromptStep() |
| 976 | ctx = StepContext( |
| 977 | inputs={"file": "auth.py"}, |
| 978 | default_integration="claude", |
| 979 | ) |
| 980 | config = { |
| 981 | "id": "review", |
| 982 | "type": "prompt", |
| 983 | "prompt": "Review {{ inputs.file }} for security issues", |
| 984 | } |
| 985 | with patch("specify_cli.workflows.steps.prompt.shutil.which", return_value=None): |
| 986 | result = step.execute(config, ctx) |
| 987 | assert result.status == StepStatus.FAILED |
| 988 | assert result.output["prompt"] == "Review auth.py for security issues" |
| 989 | assert result.output["integration"] == "claude" |
| 990 | assert result.output["dispatched"] is False |
| 991 | |
| 992 | def test_execute_with_step_integration(self): |
| 993 | from unittest.mock import patch |
nothing calls this directly
no test coverage detected