mirror of
https://github.com/aljazceru/recon-pipeline.git
synced 2025-12-20 15:54:25 +01:00
Limit tab completion of scan command to scans with installed components (#74)
* scans without installed requirements dont tab-complete * added meets_requirements functions to classes * updated tests * added check for None case
This commit is contained in:
@@ -428,12 +428,17 @@ class TestReconShell:
|
||||
"webbrowser.open", autospec=True
|
||||
) as mocked_web, patch("selectors.DefaultSelector.register", autospec=True) as mocked_selector, patch(
|
||||
"cmd2.Cmd.select"
|
||||
) as mocked_select:
|
||||
) as mocked_select, patch(
|
||||
"pipeline.recon-pipeline.get_scans"
|
||||
) as mocked_scans:
|
||||
|
||||
mocked_select.return_value = "Resume"
|
||||
mocked_popen.return_value = process_mock
|
||||
|
||||
test_input += f" --results-dir {tmp_path / 'mostuff'}"
|
||||
|
||||
mocked_scans.return_value = {"FullScan": ["pipeline.recon.wrappers"]}
|
||||
|
||||
if db_mgr is None:
|
||||
self.shell.do_scan(test_input)
|
||||
assert expected in capsys.readouterr().out
|
||||
|
||||
Reference in New Issue
Block a user