mentat.script.test_fetcher module

Unit test module for testing the mentat.script.fetcher module.

class mentat.script.test_fetcher.TestMentatFetcherScript(methodName='runTest')[source]

Bases: unittest.case.TestCase

Unit test class for testing the mentat.script.fetcher.FetcherScript class.

idea_raw = {'Attach': [{'Type': ['Malware'], 'ContentEncoding': 'base64', 'Hash': ['sha1:0c4a38c3569f0cc632e74f4c'], 'ContentType': 'application/octet-stream', 'Size': 46, 'Handle': 'att1', 'FileName': ['killemall'], 'Ref': ['Trojan-Spy:W32/FinSpy.A'], 'Content': 'TVpqdXN0a2lkZGluZwo='}], 'Category': ['Fraud.Phishing'], 'CeaseTime': '2012-11-03T09:55:22Z', 'Confidence': 1.0, 'ConnCount': 20, 'CreateTime': '2012-11-03T10:00:02Z', 'DetectTime': '2012-11-03T10:00:07Z', 'EventTime': '2012-11-03T07:36:00Z', 'Format': 'IDEA0', 'ID': '4390fc3f-c753-4a3e-bc83-1b44f24baf75', 'Node': [{'SW': ['Kippo'], 'Realm': 'cesnet.cz', 'Name': 'org.example.kippo_honey', 'AggrWin': '00:05:00', 'Tags': ['Protocol', 'Honeypot']}], 'Note': 'Synthetic example', 'Ref': ['cve:CVE-1234-5678'], 'Source': [{'Type': ['Phishing'], 'Netname': ['ripe:IANA-CBLK-RESERVED1'], 'IP6': ['2001:db8::ff00:42:0/112'], 'IP4': ['192.168.0.2-192.168.0.5', '192.168.0.0/25'], 'AttachHand': ['att1'], 'Proto': ['tcp', 'http'], 'Hostname': ['example.com'], 'URL': ['http://example.com/cgi-bin/killemall']}], 'Target': [{'Type': ['Backscatter', 'OriginSpam'], 'Spoofed': True, 'Email': ['innocent@example.com']}, {'Type': ['CasualIP'], 'Anonymised': True, 'Port': [22, 25, 443], 'IP4': ['10.2.2.0/24']}], 'WinEndTime': '2012-11-03T10:00:00Z', 'WinStartTime': '2012-11-03T05:00:00Z', '_CESNET': {'EventClass': 'vulnerable-config-ssdp', 'EventTemplate': 'sserv-012', 'Impact': 'System provides SDDP service and can be misused for massive DDoS attack', 'ResolvedAbuses': ['abuse@cesnet.cz']}}
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_time_calculations()[source]

Perform the basic operativity tests.

verbose = False