SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
tests: re-add test/unit/test_spiderfootscanstatus.py
Brendan Coles585a7dcd6788
diff --git a/test/unit/test_spiderfootscanstatus.py b/test/unit/test_spiderfootscanstatus.pynew file mode 100644index 00000000..ba4bd5a3--- /dev/null+++ b/test/unit/test_spiderfootscanstatus.py@@ -0,0 +1,55 @@+# test_spiderfootscanstatus.py+from sflib import SpiderFootScanStatus+import unittest++class TestSpiderFootScanStatus(unittest.TestCase):+ """+ Test SpiderFootScanStatus+ """++ def test_set_status_should_return_none(self):+ """+ Test setStatus(self, scanId, status)+ """+ globalScanStatus = SpiderFootScanStatus()++ scan_id = 'example scan id'+ status = 'example status'++ scan_status = globalScanStatus.setStatus(scan_id, status)+ self.assertEqual(None, scan_status)++ def test_get_status_should_return_a_string(self):+ """+ Test getStatus(self, scanId)+ """+ globalScanStatus = SpiderFootScanStatus()++ scan_id = 'example scan id'+ status = 'example status'+ globalScanStatus.setStatus(scan_id, status)++ scan_status = globalScanStatus.getStatus(scan_id)+ self.assertEqual(status, scan_status)++ def test_get_status_invalid_status_should_return_none(self):+ """+ Test getStatus(self, scanId)+ """+ globalScanStatus = SpiderFootScanStatus()++ scan_status = globalScanStatus.getStatus(None)+ self.assertEqual(None, scan_status)++ def test_get_status_all_should_return_a_dict(self):+ """+ Test getStatusAll(self)+ """+ globalScanStatus = SpiderFootScanStatus()++ scan_status = globalScanStatus.getStatusAll()+ self.assertEqual(dict, type(scan_status))++if __name__ == '__main__':+ unittest.main()+