Skip to content

fix: logger.warn() warning & test_output_vex test (#1691) #1692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cve_bin_tool/output_engine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def output_pdf(
merge_report,
exploits: bool = False,
):
LOGGER.warn("PDF output requires install of reportlab")
LOGGER.warning("PDF output requires install of reportlab")


class OutputEngine:
Expand Down
3 changes: 2 additions & 1 deletion test/test_output_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,8 @@ def test_output_csv(self):
def test_output_vex(self):
"""Test creating VEX formatted file"""
self.output_engine.generate_vex(self.MOCK_OUTPUT, "test.vex")
self.assertEqual(json.load(open("test.vex")), self.VEX_FORMATTED_OUTPUT[0])
with open("test.vex") as f:
self.assertEqual(json.load(f), self.VEX_FORMATTED_OUTPUT[0])
os.remove("test.vex")

@unittest.skipUnless(
Expand Down