SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
tests: Add test/integration/test_sfcli.py
Brendan Coles0d887dbc6dd7
diff --git a/test/integration/test_sfcli.py b/test/integration/test_sfcli.pynew file mode 100644index 00000000..c4a0dcb6--- /dev/null+++ b/test/integration/test_sfcli.py@@ -0,0 +1,25 @@+# test_sfcli.py+import subprocess+import sys+import unittest+++class TestSfcli(unittest.TestCase):+ """+ Test TestSfcli+ """++ def execute(self, command):+ proc = subprocess.Popen(+ command,+ stdout=subprocess.PIPE,+ stderr=subprocess.PIPE,+ )+ out, err = proc.communicate()+ return out, err, proc.returncode++ def test_help_arg_should_print_help_and_exit(self):+ out, err, code = self.execute([sys.executable, "sfcli.py", "-h"])+ self.assertIn(b"show this help message and exit", out)+ self.assertEqual(b"", err)+ self.assertEqual(0, code)diff --git a/test/unit/test_spiderfootcli.py b/test/unit/test_spiderfootcli.pyindex 6efe2d01..3facad83 100644--- a/test/unit/test_spiderfootcli.py+++ b/test/unit/test_spiderfootcli.py@@ -1,6 +1,5 @@# test_spiderfootcli.pyimport io-import subprocessimport sysimport unittest@@ -27,21 +26,6 @@ class TestSpiderFootCli(unittest.TestCase):"cli.server_baseurl": "http://127.0.0.1:5001"}- def execute(self, command):- proc = subprocess.Popen(- command,- stdout=subprocess.PIPE,- stderr=subprocess.PIPE,- )- out, err = proc.communicate()- return out, err, proc.returncode-- def test_help_arg_should_print_help_and_exit(self):- out, err, code = self.execute([sys.executable, "sfcli.py", "-h"])- self.assertIn(b"show this help message and exit", out)- self.assertEqual(b"", err)- self.assertEqual(0, code)-def test_default(self):"""Test default(self, line)