From 34b82d83a1a1419694938c49ba64778f91c680b2 Mon Sep 17 00:00:00 2001 From: Terri Oda Date: Mon, 26 Aug 2024 10:51:17 -0700 Subject: [PATCH] test: re-enable some disabled tests (#4376) * replaces #4353 * partial fix for #4243 Re-enables the tests that are now passing consistently, fixes expectations for zstandard vendor. Signed-off-by: Terri Oda --- test/test_csv2cve.py | 1 - test/test_exploits.py | 1 - test/test_language_scanner.py | 8 +++----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/test/test_csv2cve.py b/test/test_csv2cve.py index ca2f376f3c..b8db9b70f8 100644 --- a/test/test_csv2cve.py +++ b/test/test_csv2cve.py @@ -11,7 +11,6 @@ class TestCSV2CVE: - @pytest.mark.skip(reason="Cache is broken, disabling temporarily") @pytest.mark.asyncio async def test_csv2cve_valid_file(self, caplog): file_path = join(dirname(__file__), "csv", "triage.csv") diff --git a/test/test_exploits.py b/test/test_exploits.py index 3e58e21bbc..348ba5c2e8 100644 --- a/test/test_exploits.py +++ b/test/test_exploits.py @@ -81,7 +81,6 @@ class TestExploitScanner: ), ), ) - @pytest.mark.skip(reason="Cache is broken, disabling temporarily") def test_exploit_checker( self, check_exploits, exploits_list, product_info, triage_info, expected_result ): diff --git a/test/test_language_scanner.py b/test/test_language_scanner.py index 4192d38e18..ec480b5287 100644 --- a/test/test_language_scanner.py +++ b/test/test_language_scanner.py @@ -11,7 +11,6 @@ from cve_bin_tool import parsers from cve_bin_tool.cvedb import CVEDB from cve_bin_tool.log import LOGGER -from cve_bin_tool.util import ProductInfo from cve_bin_tool.version_scanner import VersionScanner @@ -369,7 +368,6 @@ def test_language_package( assert p in found_product assert file_path == filename - @pytest.mark.skip(reason="Cache is broken, disabling temporarily") @pytest.mark.parametrize("filename", ((str(TEST_FILE_PATH / "PKG-INFO")),)) def test_python_package(self, filename: str) -> None: """Test against python's PKG-INFO metadata file""" @@ -378,7 +376,7 @@ def test_python_package(self, filename: str) -> None: for product in scanner.scan_file(filename): if product: product_info, file_path = product - assert product_info == ProductInfo( - "facebook", "zstandard", "0.18.0", filename - ) + assert product_info[1] == "zstandard" + assert product_info[2] == "0.18.0" + assert product_info[3] == filename assert file_path == filename