SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
tests: update module unit tests
Brendan Colesd9665500c611
diff --git a/test/unit/modules/test_sfp_hosting.py b/test/unit/modules/test_sfp_hosting.pyindex 9c766c47..eeceeab8 100644--- a/test/unit/modules/test_sfp_hosting.py+++ b/test/unit/modules/test_sfp_hosting.py@@ -57,7 +57,6 @@ class TestModuleHosting(unittest.TestCase):module = sfp_hosting()self.assertIsInstance(module.producedEvents(), list)- @unittest.skip("todo - test fails due to self.opts['_useragent'] = None")def test_handleEvent(self):"""Test handleEvent(self, event)diff --git a/test/unit/modules/test_sfp_iban.py b/test/unit/modules/test_sfp_iban.pyindex b95fcf5f..f5e3609c 100644--- a/test/unit/modules/test_sfp_iban.py+++ b/test/unit/modules/test_sfp_iban.py@@ -73,9 +73,17 @@ class TestModuleIban(unittest.TestCase):event_type = 'ROOT'event_data = 'example data'- event_module = ''+ event_module = 'sfp_test_module'source_event = ''+ source_event = SpiderFootEvent(event_type, event_data, event_module, source_event)++ event_type = 'TARGET_WEB_CONTENT'+ event_data = 'example data'+ event_module = 'sfp_test_module'evt = SpiderFootEvent(event_type, event_data, event_module, source_event)result = module.handleEvent(evt)+ self.assertIsNone(result)++ self.assertEqual('TBD', 'TBD')diff --git a/test/unit/modules/test_sfp_webframework.py b/test/unit/modules/test_sfp_webframework.pyindex a7ce970e..967b9eb4 100644--- a/test/unit/modules/test_sfp_webframework.py+++ b/test/unit/modules/test_sfp_webframework.py@@ -1,11 +1,11 @@-# test_sfp_strangeheaders.py+# test sfp_webframework.pyfrom sflib import SpiderFoot, SpiderFootEvent, SpiderFootTargetimport unittest-from modules.sfp_strangeheaders import sfp_strangeheaders+from modules.sfp_webframework import sfp_webframeworkclass TestModuleWebFramework(unittest.TestCase):"""- Test modules.sfp_strangeheaders+ Test modules.sfp_webframework"""default_options = {@@ -37,7 +37,7 @@ class TestModuleWebFramework(unittest.TestCase):}def test_opts(self):- module = sfp_strangeheaders()+ module = sfp_webframework()self.assertEqual(len(module.opts), len(module.optdescs))def test_setup(self):@@ -46,15 +46,15 @@ class TestModuleWebFramework(unittest.TestCase):"""sf = SpiderFoot(self.default_options)- module = sfp_strangeheaders()+ module = sfp_webframework()module.setup(sf, dict())def test_watchedEvents_should_return_list(self):- module = sfp_strangeheaders()+ module = sfp_webframework()self.assertIsInstance(module.watchedEvents(), list)def test_producedEvents_should_return_list(self):- module = sfp_strangeheaders()+ module = sfp_webframework()self.assertIsInstance(module.producedEvents(), list)def test_handleEvent(self):@@ -63,7 +63,7 @@ class TestModuleWebFramework(unittest.TestCase):"""sf = SpiderFoot(self.default_options)- module = sfp_strangeheaders()+ module = sfp_webframework()module.setup(sf, dict())target_value = 'example target value'