Stub the interactive init prompts and select hook installation.
(mocker: MockFixture)
| 259 | |
| 260 | |
| 261 | def _init_hook_answers(mocker: MockFixture) -> None: |
| 262 | """Stub the interactive init prompts and select hook installation.""" |
| 263 | mocker.patch( |
| 264 | "questionary.select", |
| 265 | side_effect=[ |
| 266 | FakeQuestion("pyproject.toml"), |
| 267 | FakeQuestion("cz_conventional_commits"), |
| 268 | FakeQuestion("commitizen"), |
| 269 | FakeQuestion("semver"), |
| 270 | ], |
| 271 | ) |
| 272 | mocker.patch("questionary.confirm", return_value=FakeQuestion(True)) |
| 273 | mocker.patch("questionary.text", return_value=FakeQuestion("$version")) |
| 274 | mocker.patch( |
| 275 | "questionary.checkbox", |
| 276 | return_value=FakeQuestion(["commit-msg", "pre-push"]), |
| 277 | ) |
| 278 | |
| 279 | |
| 280 | class TestHookInstallerSelection: |
no test coverage detected