Files
recon-pipeline/tests/test_recon/test_config.py
epi052 1d5155f930 Add scan tests (#10)
* recon.targets tests added

* restructured tests logically

* fixed yaml error

* fixed job names

* recon.__init__ tests added

* recon.config tests added

* recon.amass.ParseAmassScan tests added

* fixed test destined to fail on CI pipeline

* testing amass partially complete

this commit closes #6 and #8
updated existing tests to utilize new paths
2020-01-30 17:25:42 -06:00

43 lines
978 B
Python

from pathlib import Path
from ..utils import is_kali
from recon.config import tool_paths, defaults, web_ports, top_tcp_ports, top_udp_ports
def test_tool_paths_absolute():
for path in tool_paths.values():
assert Path(path).is_absolute()
def test_wordlist_exists():
if is_kali():
assert Path(defaults.get("gobuster-wordlist")).exists()
def test_threads_numeric():
assert defaults.get("threads").isnumeric()
def test_masscan_rate_numeric():
assert defaults.get("masscan-rate").isnumeric()
def test_aquatone_scan_timeout_numeric():
assert defaults.get("aquatone-scan-timeout").isnumeric()
def test_webports_exist_and_numeric():
assert web_ports is not None
for port in web_ports:
assert port.isnumeric()
def test_top_tcp_ports_exist():
assert top_tcp_ports is not None
assert len(top_tcp_ports) >= 1
def test_top_udp_ports_exist():
assert top_udp_ports is not None
assert len(top_udp_ports) >= 1