Skip to content

Commit 573f053

Browse files
committed
update
1 parent 73939e7 commit 573f053

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

unittests/tools/test_zora_parser.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,21 @@
99
class TestZoraParser(DojoTestCase):
1010

1111
def test_parse_file_with_no_vuln_has_no_finding(self):
12-
with (get_unit_tests_scans_path("zora") / "zora_no_vuln.csv").open(encoding="utf-8") as testfile:
12+
with (get_unit_tests_scans_path("zora") / "scan_empty.csv").open(encoding="utf-8") as testfile:
1313
reader = csv.DictReader(testfile)
1414
parser = ZoraParser()
1515
findings = parser.get_findings(Test(), reader)
1616
self.assertEqual(0, len(findings))
1717

1818
def test_parse_file_with_many_vuln_has_many_findings(self):
19-
with (get_unit_tests_scans_path("zora") / "zora_many_vuln.csv").open(encoding="utf-8") as testfile:
19+
with (get_unit_tests_scans_path("zora") / "scan_many.csv").open(encoding="utf-8") as testfile:
2020
reader = csv.DictReader(testfile)
2121
parser = ZoraParser()
2222
findings = parser.get_findings(Test(), reader)
23-
self.assertEqual(50, len(findings)) # Adjust based on your test file
23+
self.assertEqual(198, len(findings)) # Adjust based on your test file
2424
# Check a specific finding for correctness
2525
finding = findings[10]
26+
self.assertEqual("net/url: Insufficient validation of bracketed IPv6 hostnames in net/url", finding.title)
2627
self.assertEqual("Medium", finding.severity)
2728
self.assertTrue(finding.unique_id_from_tool.startswith(f"{finding.description.splitlines()[0].split(': ')[1]}"))
2829
self.assertIn("Fix Version", finding.description)

0 commit comments

Comments
 (0)