Skip to content

Commit

Permalink
add unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-sommer committed Feb 14, 2024
1 parent d551596 commit 56a28e6
Show file tree
Hide file tree
Showing 2 changed files with 7,721 additions and 0 deletions.
7,711 changes: 7,711 additions & 0 deletions unittests/scans/tenable/nessus/issue_6992.nessus

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions unittests/tools/test_tenable_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,3 +268,13 @@ def test_parse_many_tenable_vulns(self):
self.assertEqual(1, len(finding.unsaved_vulnerability_ids))
for vulnerability_id in finding.unsaved_vulnerability_ids:
self.assertEqual('CVE-2023-32233', vulnerability_id)

def test_parse_issue_6992(self):
testfile = open("unittests/scans/tenable/nessus/issue_6992.nessus")
parser = TenableParser()
findings = parser.get_findings(testfile, self.create_test())
for finding in findings:
for endpoint in finding.unsaved_endpoints:
endpoint.clean()
self.assertEqual(1, len(findings))
self.assertEqual("High", findings[0].severity)

0 comments on commit 56a28e6

Please sign in to comment.