Beispiel #1
0
 def test_parse_file_with_multiple_vuln_cli_output(self):
     testfile = open(
         get_unit_tests_path() +
         "/scans/whitesource_sample/cli_generated_many_vulns.json")
     parser = WhitesourceParser()
     findings = parser.get_findings(testfile, Test())
     self.assertEqual(20, len(findings))
Beispiel #2
0
 def test_parse_file_with_no_vuln_has_no_findings(self):
     testfile = open(
         "unittests/scans/whitesource_sample/okhttp_no_vuln.json")
     parser = WhitesourceParser()
     findings = parser.get_findings(testfile, Test())
     self.assertEqual(0, len(findings))
Beispiel #3
0
 def test_parse_file_with_multiple_vuln_has_multiple_finding(self):
     testfile = open(
         "dojo/unittests/scans/whitesource_sample/okhttp_many_vuln.json")
     parser = WhitesourceParser()
     findings = parser.get_findings(testfile, Test())
     self.assertEqual(6, len(findings))