コード例 #1
0
 def __init__(self, options=None):
     self.options = options or Options()
     self.rsyslog = Rsyslog()
     self.leef = Leef(options)
     self.cef = Cef(options)
     self.sumo = Sumologic()
     self.event_handler = EventHandler()
コード例 #2
0
 def __init__(self, options=None):
     self.options = options or Options()
     self.rsyslog = Rsyslog()
     self.leef = Leef(options)
     self.cef = Cef(options)
コード例 #3
0
import cloudpassage
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), '../../', ''))
from lib.rsyslog import Rsyslog

rsyslog = Rsyslog()


class TestUnitRsyslog:
    def test_valid_parse_facility(self):
        assert rsyslog.parse_facility('user,info') is None

    def test_invalid_parse_facility(self):
        accepted = False
        try:
            rsyslog.parse_facility('foo,bar')
        except:
            accepted = True
        assert accepted