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