MCPcopy
hub / github.com/github/spec-kit / test_execute_basic

Method test_execute_basic

tests/test_workflows.py:970–990  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

executeMethod · 0.95
PromptStepClass · 0.90
StepContextClass · 0.90

Tested by

no test coverage detected