mentat.plugin.enricher.test_whois module

Unit test module for testing the mentat.plugin.enricher.whois module.

class mentat.plugin.enricher.test_whois.TestMentatWhoisEnricherPlugin(methodName='runTest')[source]

Bases: mentat.plugin.enricher.testsuite.MentatEnricherPluginTestCase

Unit test class for testing the mentat.plugin.enricher.whois.WhoisEnricherPlugin class.

networks_raw = [{'resolved_abuses': ['abuse@muni.cz'], 'source': 'negistry', 'netname': 'MUNI-01', 'id': 1, 'type': 'ipv4', 'network': '195.178.86.0-195.178.87.255'}, {'resolved_abuses': ['abuse@muni.cz'], 'source': 'negistry', 'netname': 'MUNI-02', 'id': 2, 'type': 'ipv4', 'network': '147.251.0.0-147.251.255.255'}, {'resolved_abuses': ['abuse@muni.cz'], 'source': 'negistry', 'netname': 'MUNI-03', 'id': 3, 'type': 'ipv6', 'network': '2001:718:800:5::/64'}, {'resolved_abuses': ['abuse@cesnet.cz'], 'source': 'negistry', 'netname': 'CESNET-01', 'id': 4, 'type': 'ipv4', 'network': '195.179.86.0-195.179.87.255'}, {'resolved_abuses': ['abuse@cesnet.cz'], 'source': 'negistry', 'netname': 'CESNET-00', 'id': 5, 'type': 'ipv4', 'network': '195.179.0.0-195.179.255.255'}, {'resolved_abuses': ['abuse@cesnet.cz'], 'source': 'negistry', 'netname': 'CESNET-02', 'id': 6, 'type': 'ipv4', 'network': '147.252.0.0-147.252.255.255'}, {'resolved_abuses': ['abuse@cesnet.cz'], 'source': 'negistry', 'netname': 'CESNET-03', 'id': 7, 'type': 'ipv6', 'network': '2001:718:1:6::/64'}]
setUp()[source]

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

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

test_01_setup()[source]

Perform test of plugin setup.

test_02_process_01()[source]

Perform tests of message processing - message that should be enriched.

test_03_process_02()[source]

Perform tests of message processing - message that should not be enriched.