def METHOD_NAME(mock_packages, mock_fetch, mock_stage, monkeypatch):
    # TODO: mock_fetch doesn't actually work with stage, working around with ignoring
    # fail_on_error for now
    def _get_number(*args, **kwargs):
        return 1
    monkeypatch.setattr(tty, "get_number", _get_number)
    output = spack_checksum("preferred-test", fail_on_error=False)
    assert "version of preferred-test" in output
    assert "version(" in output