@patch('paasta_tools.cli.cmds.check.is_file_in_dir')
@patch('sys.stdout', new_callable=StringIO)
def test_check_sensu_check_fail(mock_stdout, mock_is_file_in_dir):
    # monitoring.yaml doest exist

    mock_is_file_in_dir.return_value = False
    expected_output = "%s\n" % PaastaCheckMessages.SENSU_MONITORING_MISSING

    sensu_check(service='fake_service', service_path='path', soa_dir='path')
    output = mock_stdout.getvalue()

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