diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/cc/conftest.py | 2 | ||||
| -rw-r--r-- | tests/cc/test_cc_analysis.py | 4 | ||||
| -rw-r--r-- | tests/cc/test_cc_protection_profiles.py | 4 | ||||
| -rw-r--r-- | tests/data/protection_profiles/dataset.json (renamed from tests/data/protection_profiles/pp.json) | 0 |
4 files changed, 5 insertions, 5 deletions
diff --git a/tests/cc/conftest.py b/tests/cc/conftest.py index 91f8caab..8651b92e 100644 --- a/tests/cc/conftest.py +++ b/tests/cc/conftest.py @@ -39,7 +39,7 @@ def toy_dataset() -> CCDataset: @pytest.fixture def toy_pp_dataset() -> ProtectionProfileDataset: - with resources.path(tests.data.protection_profiles, "pp.json") as path: + with resources.path(tests.data.protection_profiles, "dataset.json") as path: return ProtectionProfileDataset.from_json(path) diff --git a/tests/cc/test_cc_analysis.py b/tests/cc/test_cc_analysis.py index 6591ca18..a6b1b5e1 100644 --- a/tests/cc/test_cc_analysis.py +++ b/tests/cc/test_cc_analysis.py @@ -37,11 +37,11 @@ def processed_cc_dset( ) -> CCDataset: tmp_dir = tmp_path_factory.mktemp("cc_dset") shutil.copytree(analysis_data_dir, tmp_dir, dirs_exist_ok=True) - shutil.copy(pp_data_dir / "pp.json", tmp_dir / "pp.json") + shutil.copy(pp_data_dir / "dataset.json", tmp_dir / "dataset.json") cc_dset = CCDataset.from_json(tmp_dir / "vulnerable_dataset.json") cc_dset.aux_handlers[ProtectionProfileDatasetHandler].root_dir.mkdir(parents=True, exist_ok=True) - shutil.copy(tmp_dir / "pp.json", cc_dset.aux_handlers[ProtectionProfileDatasetHandler].dset_path) + shutil.copy(tmp_dir / "dataset.json", cc_dset.aux_handlers[ProtectionProfileDatasetHandler].dset_path) cc_dset.aux_handlers[ProtectionProfileDatasetHandler].process_dataset() cc_dset.aux_handlers[CPEMatchDictHandler].dset = {} diff --git a/tests/cc/test_cc_protection_profiles.py b/tests/cc/test_cc_protection_profiles.py index b8d2e821..29cee8b7 100644 --- a/tests/cc/test_cc_protection_profiles.py +++ b/tests/cc/test_cc_protection_profiles.py @@ -13,7 +13,7 @@ def test_dataset_from_json(toy_pp_dataset: ProtectionProfileDataset, pp_data_dir with (tmp_path / "dset.json").open("r") as handle: data = json.load(handle) - with (pp_data_dir / "pp.json").open("r") as handle: + with (pp_data_dir / "dataset.json").open("r") as handle: template_data = json.load(handle) del data["timestamp"] @@ -22,7 +22,7 @@ def test_dataset_from_json(toy_pp_dataset: ProtectionProfileDataset, pp_data_dir def test_dataset_to_json(toy_pp_dataset: ProtectionProfileDataset, pp_data_dir: Path, tmp_path: Path): - assert toy_pp_dataset == ProtectionProfileDataset.from_json(pp_data_dir / "pp.json") + assert toy_pp_dataset == ProtectionProfileDataset.from_json(pp_data_dir / "dataset.json") compressed_path = tmp_path / "dset.json.gz" toy_pp_dataset.to_json(compressed_path, compress=True) decompressed_dataset = ProtectionProfileDataset.from_json(compressed_path, is_compressed=True) diff --git a/tests/data/protection_profiles/pp.json b/tests/data/protection_profiles/dataset.json index 7b96cf8c..7b96cf8c 100644 --- a/tests/data/protection_profiles/pp.json +++ b/tests/data/protection_profiles/dataset.json |
