Skip to content

Commit 941b258

Browse files
committed
Fixing linter issues PTH123
1 parent cede5fa commit 941b258

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

unittests/tools/test_generic_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ def test_parse_csv_with_epss(self):
700700
self.assertEqual(.23474, finding.epss_percentile)
701701

702702
def test_parse_json_custom_test_with_meta(self):
703-
with open(get_unit_tests_scans_path("generic") / "generic_custom_test_with_meta.json", encoding="utf-8") as file:
703+
with (get_unit_tests_scans_path("generic") / "generic_custom_test_with_meta.json").open(encoding="utf-8") as file:
704704
parser = GenericParser()
705705
tests = parser.get_tests(parser.get_scan_types()[0], file)
706706
self.assertEqual(1, len(tests))

unittests/tools/test_tenable_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def test_parse_some_findings_csv2_all_nessus_legacy(self):
103103

104104
def test_parse_findings_all_nessus(self):
105105
"""Test that use a report with all columns selected in generate CSV Report 2025-04-14"""
106-
with open(get_unit_tests_scans_path("tenable/nessus") / "nessus-template.csv", encoding="utf-8") as testfile:
106+
with (get_unit_tests_scans_path("tenable/nessus") / "nessus-template.csv").open(encoding="utf-8") as testfile:
107107
parser = TenableParser()
108108
findings = parser.get_findings(testfile, self.create_test())
109109
for finding in findings:

0 commit comments

Comments
 (0)