def test_click_invocation(mocker, user_choice, expected_value) -> None:
    """Test click function called correctly by cookiecutter.

    Test for choice type invocation.
    """
    prompt = mocker.patch('rich.prompt.Prompt.ask')
    prompt.return_value = f'{user_choice}'

    assert read_user_choice('varname', OPTIONS) == expected_value

    prompt.assert_called_once_with(EXPECTED_PROMPT, choices=OPTIONS_INDEX, default='1')
Test click function called correctly by cookiecutter.

    Test for choice type invocation.
    
tests/test_read_user_choice.py