def METHOD_NAME(monkeypatch, single_with_trials):
    """Test html is saved properly"""
    def mock_html(*args, **kwargs):
        mock_html.called = True
        return ""
    mock_html.called = False
    monkeypatch.setattr("plotly.graph_objs._figure.Figure.write_html", mock_html)
    returncode = orion.core.cli.main(
        ["plot", "regret", "--name", "test_single_exp", "--type", "html"]
    )
    assert returncode == 0
    assert mock_html.called