(choice)
| 6642 | from specify_cli.workflows._commands import _gate_outcome |
| 6643 | |
| 6644 | def _choice_payload(choice): |
| 6645 | state = SimpleNamespace( |
| 6646 | status=SimpleNamespace(value="paused"), |
| 6647 | current_step_id="review", |
| 6648 | step_results={ |
| 6649 | "review": { |
| 6650 | "type": "gate", |
| 6651 | "output": {"message": "m", "options": ["ok"], "choice": choice}, |
| 6652 | } |
| 6653 | }, |
| 6654 | ) |
| 6655 | return _gate_outcome(state)["choice"] |
| 6656 | |
| 6657 | assert _choice_payload(None) is None # no decision yet |
| 6658 | assert _choice_payload("reject") == "reject" # normal string passes through |
nothing calls this directly
no test coverage detected