@patch('paasta_tools.cli.cmds.check.validate_service_name', autospec=True)
@patch('sys.stdout', new_callable=StringIO)
def test_check_service_dir_check_pass(mock_stdout, mock_validate_service_name):
    mock_validate_service_name.return_value = None
    service = 'fake_service'
    soa_dir = '/fake_yelpsoa_configs'
    expected_output = \
        PaastaCheckMessages.service_dir_found(service, soa_dir) % "%s\n"
    service_dir_check(service, soa_dir)
    output = mock_stdout.getvalue()

    assert output == expected_output
dataset/ETHPy150Open Yelp/paasta/tests/cli/test_cmds_check.py/test_check_service_dir_check_pass/swapped operands of `%`