Example #1
0
def test_python():

    messages = ('python1', 'python2')
    s = SocketSender(AF_INET, ('localhost', port_number), dgram=0)

    expected = []
    for msg in messages:
        expected.extend(s.sendMessages(msg, pri=7))
    flush_files(2)
    stopped = stop_syslogng()
    if not stopped or not check_file_expected(
            'test-python', expected, settle_time=2):
        return False
    return True
Example #2
0
def test_python():

    messages = (
        'python1',
        'python2'
    )
    s = SocketSender(AF_INET, ('localhost', port_number), dgram=0)

    expected = []
    for msg in messages:
        expected.extend(s.sendMessages(msg, pri=7))
    flush_files(2)
    stopped = stop_syslogng()
    if not stopped or not check_file_expected('test-python', expected, settle_time=2):
        return False
    return True