We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c30909b commit 01afaf5Copy full SHA for 01afaf5
unittests/tools/test_snyk_issue_api_parser_with_json.py
@@ -7,9 +7,9 @@
7
8
class TestSnykIssueApiParserWithJson(DojoTestCase):
9
def parse_json(self, filename):
10
- testfile = (get_unit_tests_scans_path("snyk_issue_api") / filename).open(encoding="utf-8")
11
- parser = SnykIssueApiParser()
12
- return parser.get_findings(testfile, Test())
+ with (get_unit_tests_scans_path("snyk_issue_api") / filename).open(encoding="utf-8") as testfile:
+ parser = SnykIssueApiParser()
+ return parser.get_findings(testfile, Test())
13
14
def test_parse_sca_single_finding(self):
15
findings = self.parse_json("snyk_sca_scan_api_single_vuln.json")
0 commit comments