@patch('paasta_tools.cli.cmds.check.urllib2.urlopen')
@patch('sys.stdout', new_callable=StringIO)
def test_check_pipeline_check_fail_404(mock_stdout, mock_urlopen):
    mock_result = MagicMock()
    mock_result.getcode.return_value = 404
    mock_urlopen.return_value = mock_result
    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_404/original