def test_cli_with_pre_prompt_hook(cli_runner) -> None:
    """Test cli invocation in a template with pre_prompt hook."""
    template_path = 'tests/test-pyhooks/'
    result = cli_runner(template_path, '--no-input')
    assert result.exit_code == 0
    dir_name = 'inputfake-project'
    assert os.path.isdir(dir_name)
    content = Path(dir_name, "README.rst").read_text()
    assert 'foo' in content
Test cli invocation in a template with pre_prompt hook.
tests/test_cli.py