def test_raise_on_invalid_mode(invalid_kwargs) -> None:
    """Test `cookiecutter` raise exception on unacceptable `replay` request."""
    with pytest.raises(exceptions.InvalidModeException):
        main.cookiecutter('foo', replay=True, **invalid_kwargs)
Test `cookiecutter` raise exception on unacceptable `replay` request.
tests/replay/test_replay.py