def _get_statusline(params):
    """Generate a mock statusline like nose would output."""
    total = sum(params.values())
    statusline = 'Ran {total} tests in 0.001s\n\n'.format(total=total)

    info_elements = []
    if 'error' in params:
        info_elements.append('errors={error}')
    if 'failed' in params:
        info_elements.append('failures={failed}')

    if info_elements:
        statusline += 'FAILED ({0})'.format(', '.join(info_elements))
    else:
        statusline += 'OK'

    return statusline