Skip to content
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

fix(redhat_osv): restructure test data #308

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions tools/redhat/redhat_osv/convert_redhat_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ def test_convert_redhat(self):
""" Test a single demo CSAF file """
modified_time = datetime.strptime("2024-09-02T14:30:00",
"%Y-%m-%dT%H:%M:%S")
csaf_file = f"testdata/rhsa-{test_advisory}.json"
expected_file = f"testdata/RHSA-{test_advisory}.json"
csaf_file = f"testdata/CSAF/rhsa-{test_advisory}.json"
expected_file = f"testdata/OSV/RHSA-{test_advisory}.json"

with open(csaf_file, "r", encoding="utf-8") as fp:
csaf_data = fp.read()
Expand Down
2 changes: 1 addition & 1 deletion tools/redhat/redhat_osv/osv_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ScoreTest(unittest.TestCase):
def test_missing_cvss_v3(self):
"""Test parsing a CSAF file with missing CVSSv3 score"""
for test_csaf_file in self.test_csaf_files:
csaf_file = f"testdata/{test_csaf_file}"
csaf_file = f"testdata/CSAF/{test_csaf_file}"
with open(csaf_file, "r", encoding="utf-8") as fp:
csaf_data = fp.read()
csaf = CSAF(csaf_data)
Expand Down
Loading