@patch('paasta_tools.cli.cmds.check.urllib2.HTTPERROR')
@patch('paasta_tools.cli.cmds.check.urllib2')
@patch('sys.stdout', new_callable=StringIO)
def test_check_pipeline_check_fail_httperr(mock_stdout, mock_urllib2, mock_error):

    mock_urllib2.urlopen.side_effect = mock_error
    expected_output = "%s\n" % PaastaCheckMessages.PIPELINE_MISSING
    pipeline_check("fake_service")
    output = mock_stdout.getvalue()

    assert output == expected_output
dataset/ETHPy150Open Yelp/paasta/tests/cli/test_cmds_check.py/test_check_pipeline_check_fail_httperr/original