Dependency Checking (#75)

* Adds req testing methodology, needs fixes

* Improves dependency exception handling

* Better meets_requirements implementation

Still need to adjust tests to fake installation

* Changes to exception boolean to enable tool check

tests and class variables modified for new tool check

* Adjust test_get_scans to use appropriate variable

* Adds Go requirement where relevant

* Adds missing scan dependencies

* Add clarification to error message
This commit is contained in:
Ryan Good
2020-08-07 08:48:49 -05:00
committed by GitHub
parent d97315a2da
commit d7dbd1e7b3
21 changed files with 181 additions and 165 deletions

View File

@@ -14,14 +14,16 @@ class TestGobusterScan:
self.scan = GobusterScan(
target_file=__file__, results_dir=str(self.tmp_path), db_location=str(self.tmp_path / "testing.sqlite")
)
self.scan.exception = False
def teardown_method(self):
shutil.rmtree(self.tmp_path)
def test_scan_requires(self):
with patch("pipeline.recon.web.GatherWebTargets"):
retval = self.scan.requires()
assert isinstance(retval, GatherWebTargets)
with patch("pipeline.recon.web.gobuster.meets_requirements"):
retval = self.scan.requires()
assert isinstance(retval, GatherWebTargets)
def test_scan_run(self):
with patch("concurrent.futures.ThreadPoolExecutor.map") as mocked_run: