mentat.daemon.component.test_inspector module

Unit test module for testing the mentat.daemon.component.inspector module.

class mentat.daemon.component.test_inspector.TestMentatDaemonInspector(methodName='runTest')[source]

Bases: mentat.daemon.component.testsuite.DaemonComponentTestCase

Unit test class for testing the mentat.daemon.component.inspector module.

results = {'dispatch': {'message01': {'Category': ['Attempt.Login'], 'DetectTime': '2016-06-21T13:08:27Z', 'Format': 'IDEA0', 'ID': 'message01', 'Node': [{'SW': ['Kippo'], 'Name': 'cz.uhk.apate.cowrie', 'Type': ['Connection', 'Honeypot']}], 'Note': 'SSH login attempt', 'Source': [{'IP4': ['188.14.166.39']}], 'Target': [{'IP4': ['195.113.165.128/25'], 'Port': [22]}], '_CESNET': {'StorageTime': '2016-06-21T14:00:07Z'}}}, 'drop': {'message01': {'Category': ['Attempt.Login'], 'DetectTime': '2016-06-21T13:08:27Z', 'Format': 'IDEA0', 'ID': 'message01', 'Node': [{'SW': ['Kippo'], 'Name': 'cz.uhk.apate.cowrie', 'Type': ['Connection', 'Honeypot']}], 'Note': 'SSH login attempt', 'Source': [{'IP4': ['188.14.166.39']}], 'Target': [{'IP4': ['195.113.165.128/25'], 'Port': [22]}], '_CESNET': {'StorageTime': '2016-06-21T14:00:07Z'}}}, 'duplicate': {'message01': {'Category': ['Attempt.Login'], 'DetectTime': '2016-06-21T13:08:27Z', 'Format': 'IDEA0', 'ID': 'message01', 'Node': [{'SW': ['Kippo'], 'Name': 'cz.uhk.apate.cowrie', 'Type': ['Connection', 'Honeypot']}], 'Note': 'SSH login attempt', 'Source': [{'IP4': ['188.14.166.39']}], 'Target': [{'IP4': ['195.113.165.128/25'], 'Port': [22]}], '_CESNET': {'StorageTime': '2016-06-21T14:00:07Z'}}}, 'log': {'message01': {'Category': ['Attempt.Login'], 'DetectTime': '2016-06-21T13:08:27Z', 'Format': 'IDEA0', 'ID': 'message01', 'Node': [{'SW': ['Kippo'], 'Name': 'cz.uhk.apate.cowrie', 'Type': ['Connection', 'Honeypot']}], 'Note': 'SSH login attempt', 'Source': [{'IP4': ['188.14.166.39']}], 'Target': [{'IP4': ['195.113.165.128/25'], 'Port': [22]}], '_CESNET': {'StorageTime': '2016-06-21T14:00:07Z'}}}, 'report': {'message01': {'Category': ['Attempt.Login'], 'DetectTime': '2016-06-21T13:08:27Z', 'Format': 'IDEA0', 'ID': 'message01', 'Node': [{'SW': ['Kippo'], 'Name': 'cz.uhk.apate.cowrie', 'Type': ['Connection', 'Honeypot']}], 'Note': 'SSH login attempt', 'Source': [{'IP4': ['188.14.166.39']}], 'Target': [{'IP4': ['195.113.165.128/25'], 'Port': [22]}], '_CESNET': {'StorageTime': '2016-06-21T14:00:07Z'}}}, 'set': {'message01': {'Category': ['Attempt.Login'], 'DetectTime': '2016-06-21T13:08:27Z', 'Format': 'IDEA0', 'ID': 'message01', 'Node': [{'SW': ['Kippo'], 'Name': 'cz.uhk.apate.cowrie', 'Type': ['Connection', 'Honeypot']}], 'Note': 'SSH login attempt', 'Source': [{'IP4': ['188.14.166.39']}], 'Target': [{'IP4': ['195.113.165.128/25'], 'Port': [22]}], 'TestTag': {'ValueA1': 1466910407, 'ValueA2': [1466514007, 1466517607]}, '_CESNET': {'StorageTime': '2016-06-21T14:00:07Z'}}}, 'tag': {'message01': {'Category': ['Attempt.Login'], 'DetectTime': '2016-06-21T13:08:27Z', 'Format': 'IDEA0', 'ID': 'message01', 'Node': [{'SW': ['Kippo'], 'Name': 'cz.uhk.apate.cowrie', 'Type': ['Connection', 'Honeypot']}], 'Note': 'SSH login attempt', 'Source': [{'IP4': ['188.14.166.39']}], 'Target': [{'IP4': ['195.113.165.128/25'], 'Port': [22]}], 'TestTag': {'ValueA1': 'A2', 'ValueA2': ['A4', 'A5']}, '_CESNET': {'StorageTime': '2016-06-21T14:00:07Z'}}}}
setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_01_setup()[source]

Perform the component setup tests.

test_02_tag()[source]

Perform tests of ‘tag’ action.

test_04_report()[source]

Perform tests of ‘report’ action.

test_05_drop()[source]

Perform tests of ‘drop’ action.

test_06_dispatch()[source]

Perform tests of ‘dispatch’ action.

test_06_duplicate()[source]

Perform tests of ‘duplicate’ action.

test_07_log()[source]

Perform tests of ‘log’ action.